Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
jquery.simplemarquee
Advanced tools
Readme
A jQuery plugin that aims to provide a scrolling marquee similar to the good old winamp
player.
The main goal of this plugin is simplicity, so it has very little options but it works nicely.
I've tried jQuery.Marquee which provides similar functionality but:
transform: translate(x,y)
when moving text, causing unnecessary reflows<style>
tags because they are not removed on destructionSo I've decided to implement my own since it was an easy task anyway.
Check out the demo.
This same demo is available in the test/demo.html
file.
Setups the marquee with the given options
.
Once initialized, you can't change the options.
Available options
:
speed
: The speed in pixels per second, defaults to 100
.direction
: The direction, defaults to left
(available: left
, right
, top
and bottom
)cycles
: Number of cycles before pausing, defaults to 1
(pass Infinity
to cycle continously)space
: The space in px between the duplicated contents, defaults to 40
delayBetweenCycles
: The delay between each cycle in ms, defaults to 2000
handleHover
: Pause/restart on hover, defaults to true
handleResize
: Update marquee on resize, defaults to true
easing
: The timing function used for the CSS animation, defaults to linear
$('.some-el').simplemarquee();
If scrolling is not necessary, the plugin will add has-enough-space
class to the element.
Updates the marquee, including calculations made.
If restart
is true, the cycles will be restarted.
$('.some-el').simplemarquee('update');
Pauses the marquee.
Emits a pause
event.
$('.some-el').simplemarquee('pause');
Resumes the marquee.
Emits a resume
event.
$('.some-el').simplemarquee('pause');
Toggle between the pause/resume methods.
$('.some-el').simplemarquee('toggle');
Destroy marquee, releasing all events and leaving the element just like it was before.
$('.some-el').simplemarquee('destroy');
cycle
- Fired before each cyclefinish
- Fired when all cycles are donepause
- Fired when pausedresume
- Fired when resumedSimply include the jquery.simplemarquee.js
file after jQuery is loaded.
This plugin also integrates with AMD
(no shim required) and CommonJS
.
This plugin makes use of CSS transforms
, so it's usage is limited to IE >= 10
.
No tests yet :(
FAQs
A jQuery plugin that aims to provide a scrolling marquee similar to the good old winamp player
The npm package jquery.simplemarquee receives a total of 8 weekly downloads. As such, jquery.simplemarquee popularity was classified as not popular.
We found that jquery.simplemarquee 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.