marquee
Marquee all the things!
First, start by adding elements to your page. Just like any other normal day:
<h1>This is a test</h1>
Then, make everything better with marquee:
marquee('h1');
There are some configuration options also:
marquee('h1', {
speed: 250,
freezeDelay: 1000
});
Also, marquee
can detect whether the text fits in it's container using the measureText for the canvas 2D context:
marque('h1', {
checkOverflow: true
});
Implementations
Initial implementation was done using Canvas 2D Text, but looked crap on High Density Devices. Has been dropped back to a simple DOM implementation for the moment.
License
MIT: http://damonoehlman.mit-license.org/