jQuery实现的超酷打字机效果_时代Java(NowJava.com) -JS/jQuery代码 -演示与下载 -时代Java

jTicker Demo

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.

Not 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.

jTicker 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.

代码整理:时代Java(NowJava.com) 

转载请注明出处,此代码仅供学习交流,请勿用于商业用途。

下载代码说明
X关闭

jQuery实现非常逼真的超酷打字机效果(一个一个的输出)

jQuery实现的超酷打字机效果,预定一段文本,通过脚本控制其按照打字机效果一个一个的输出,经测试效果非常逼真。