Rest in peace, little element tag. You're dead to standards-conscious developers now.
Every once in awhile, though, there is still some use for the glorious, never-ending text scroll that is the marquee. But we do not need to resort to deprecated tags. We can make the marquee better. Faster (or slower). More responsive.
Enter plumarquee. Implementation is simple:
- Pick what you want to animate.
<p>I want to animate this</p>
- Wrap your target in an outer element with a unique identifier.
<div id="marquee"><p>I want to animate this</p></div>
- Load your favorite jquery library.
- Load plumarquee and call the marquee function.
- direction - the direction in which you want your marquee to move ('left', 'right', 'up', 'down')
- speed - how fast the marquee should animate, in pixels per second (integer)
What's with that wonky measurement?
It's Maths. Normal jQuery animations are timed off of duration - how long it takes to get from point A to point B. If the distance between point A and point B is constantly changing, then the speed of the animation also varies. Which means elements in relatively-sized containers on small screens will animate in slow motion, while those on large screens will zip by.
Plumarquee takes a different approach. Set the speed for your animation, and Internet Magic®* will keep your marquee scrolling at the same pace, regardless of screen size. The pixels/second measure may be a bit odd, but it's not all that complicated. Larger numbers speed up the marquee, smaller values slow it down.
- element: text
BREAKING NEWS: THIS IS ON THE INTERNET. DETAILS AT 11.
- element: image
- element: link
- element: div
List of possible bunny names
- Iron Hawthorne Nelson