Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@gov.au/animate
Advanced tools
A JavaScript function to animate CSS properties of page elements.
A JavaScript function to open, close and toggle the display of page elements.
yarn add @gov.au/animate
npm install @gov.au/animate
Animate has 3 public functions:
AU.animate.Run( options )
The options settings are:
element
- DOM node/s you want to animate
property
- CSS property you want to animate (optional, defaults to height
)
endSize
- 'auto' or pixel size of the property after the animation has finished (optional)
speed
- animation speed in milliseconds (optional, defaults to 250ms
)
callback
- callback function to run when the animation completes (optional)
Example:
AU.animate.Run(
element: document.getElementById('elementId'),
property: 'height',
endSize: 'auto',
speed: 1000,
callback: myFunction,
)
AU.animate.Stop( options )
The options settings are:
element
- DOM node you want to stop animating (this can only be a single element)
Example:
AU.animate.Stop(
element: document.getElementById('elementId'),
)
AU.animate.Toggle( options )
The options settings are:
element
- DOM node/s you want to animate
property
- CSS property you want to animate (optional, defaults to height
)
openSize
- pixel size of the property when the element is open (optional, defaults to auto
)
closeSize
- pixel size of the property when the element is closed (optional, defaults to 0
)
speed
- animation speed in milliseconds (optional, defaults to 250ms
)
prefunction
- function to be executed before any animation starts, passes {object} element, {string} state (optional)
postfunction
- function to be executed after any animation ends, passes {object} element, {string} state (optional)
callback
- function to be executed after the animation ends, passes {object} element, {string} state (optional)
Example:
AU.animate.Toggle(
element: document.getElementById('elementId'),
property: 'height',
closeSize: 0,
openSize: 'auto',
speed: 1000,
prefunction: function( element, state ) { myPreFunction() },
postfunction: function( element, state ) { myPreFunction() },
callback: function( element, state ) { myCallbackFunction() },
)
animate
The visual test: https://auds.service.gov.au/packages/animate/tests/site/
Run jest
for the unit tests
Copyright (c) Commonwealth of Australia. Licensed under MIT.
FAQs
A JavaScript function to animate CSS properties of page elements.
The npm package @gov.au/animate receives a total of 13 weekly downloads. As such, @gov.au/animate popularity was classified as not popular.
We found that @gov.au/animate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.