Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vanilla-marquee
Advanced tools
An es5 vanilla-js implementation of [jQuery.marquee](https://github.com/aamirafridi/jQuery.Marquee/)
An es5 vanilla-js implementation of jQuery.marquee
npm i vanilla-marquee
import maqruee from 'vanilla-marquee'
new marquee( element, {
options
})
https://mattiacoll.github.io/vanilla-marquee-site/
Although this plugin can be a drop in replacment for the jQuery plugin there are some caveats, which may be deal breaking:
allowCss3Support
and easing
options have been removed (all animations use the @keyframe implementation)pauseOnCycle
option has been removed, since it was available only when allowCss3Support
was set to false
babel({
babelHelpers: 'bundled',
exclude: '/node_modules/',
include: [
'src/**', // src folder
/node_modules\/.+(vanilla-marquee|matt-utils)/,
]
}),
instance.method()
, in the jQuery version they can be called using $( selector ).marquee( 'methodName' )
Option | Default | Description |
---|---|---|
css3easing | 'linear' | a css3 transtion timing |
delayBeforeStart | 1000 | Time in ms before the marquee starts animating |
direction | 'left' | Direction towards which the marquee will animate 'left', 'right', 'up', 'down' |
duplicated | false | Should the marquee be duplicated to show an effect of continuous flow. Use this only when the text is shorter than the container |
duration | 5000 | Duration in ms in which you want your element to travel |
speed | 0 | Speed will override duration. Speed allows you to set a relatively constant marquee speed regardless of the width of the containing element. Speed is measured in pixels/second |
gap | 20 | Gap in pixels between the tickers. Will work only when the duplicated option is set to true . Note: 20 means 20px so no need to use '20px' as the value. |
pauseOnHover | false | Pause the marquee on hover. |
startVisible | false | The marquee will be visible from the start if set to true . |
recalcResize | false | Should the marquee be updated on resize. |
Name | Description |
---|---|
pause | To pause the marquee at any time. |
resume | To resume the marquee after being paused previously. |
toggle | To toggle between pause and resume methods. |
destroy | To remove the marquee and all attached events from your element. This method is useful if you are loading/changing the data using Ajax or just another string. You can combine this with the finished event so you can have the marquee show some data and as soon as it finishes showing that, you can destroy it, change the html and then apply the plugin again. |
refresh | Recalcs the marquee size and position. Works like the recalcResize but is triggered manually instead of on window resize |
Name | Description |
---|---|
beforeStarting | Event will be fired on the element before animation starts. |
finished | Event will be fired on the element on each iteration of the animation when it finishes. |
paused | Event will be fired on the element when the animation is paused. |
resumed | Event will be fired on the element when the animation is resumed. |
FAQs
An es5 vanilla-js implementation of [jQuery.marquee](https://github.com/aamirafridi/jQuery.Marquee/)
The npm package vanilla-marquee receives a total of 179 weekly downloads. As such, vanilla-marquee popularity was classified as not popular.
We found that vanilla-marquee demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.