jTicker
Download
- jquery.jticker.js [6k] 0.9.1 BETA
- jquery.jticker.0.9.1.zip [2k] 0.9.1 BETA ZIPPED
- jquery.jticker.0.9.zip [2k] 0.9 BETA ZIPPED
What does jTicker do?
jTicker takes an elements' children and displays them one by one, in sequence, writing their text 'ticker tape' style. It is smart enough to ticker text from an element heirarchy, inserting elements back into the DOM tree as it needs them. That means almost any content can be 'tickered'.
It can be controlled with jQuery events.
nextNot my cup of tea, really, ...
annoying little blinky things trying to distract attention when you want to get on with the serious business of reading a website, but if it's your thing, here it is.
I have a friend in an agency in London who needed it. That's my only excuse.
nextjTicker has some neat features:
- jTicker can be declared on any element, and it respects that element's DOM tree, printing it back out with the same hierarchy.
- jTicker handles any number of alternating cursors (or just one).
- jTicker's cursor container is styleable using the class .cursor, or can be defined as your own jQuery object
- jTicker reacts to jQuery events "play", "stop" and "control". You can try them out below.
There is one caveat:
- jTicker can't understand text and children at the same level (I don't know how to do that yet), so if you want some text and then a link, you have to wrap the text in, say, a span, like this:
|span| some text |/span| |a|and then a link|/a|
- But obviously not with those brackets. That's another thing, jTicker is not good at handling html character entities. So make that two caveats.
Events
- play
- plays from the next item. You can also define the item to play.
- stop
- stops tickering at the end of the current item.
- control
- accesses controls like rate. Ooops, Speed it up again. Or cursor element.
This document is a work in progress
For now you can find what you need on the source code of this page.
Sites using jTicker
Let me know if you have a site that uses jTicker using the 'Write to me' form at the top of this page.
Version history
0.9.1
- jTicker now tickers elements with only one item.
0.9
- Works nicely, but cant be declared on more than one element on a page. Some variable is getting mixed up somewhere. Shouldn't be too hard to track it down...
- Peter Wilson of robson-brown.co.uk identified a bug - a bug in my thinking, not in the code. You can't jTicker an element that has only one child, such as a ul with only one li inside it. jTicker gets really carried away. It never stops and empties because it waits for the child index to change before doing so, but of course the index never does change with just one li. Should be a relatively quick fix.