forked from 23critters/SimpleMooTicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
59 lines (41 loc) · 1.52 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Style Select
============
A simple ticker written within the MooTools framework
How to use
----------
Javascript snippet to initialize the class:
window.addEvent("domready", function() {
var T = new SimpleMooTicker({
container: document.id("wrapper"),
step: 5,
periodical: 100
});
});
HTML snippet:
<div id="wrapper">
<ul>
<li>First ticker message <a href="#">and a link</a></li>
<li>Second ticker message <a href="#">and a link</a></li>
<li>Third ticker message <a href="#">and a link</a></li>
<li>Fourth ticker message <a href="#">and a link</a></li>
<li>Fifth ticker message <a href="#">and a link</a></li>
</ul>
</div>
Options
-----------------
container: (string||object) reference to div dom element container | required
autostart: (boolean) wether the scrolling of the ticker should autostart or not | default: true
animation: (string) wether the ticker text should "scroll" or "fade" | default: "scroll"
steps: (integer) how many pixels to the left should the ticker take each iteration when "animation: scroll" is chosen | default: 5 pixels
duration: (integer) amount of miliseconds between each iteration | default 100 miliseconds
NB! the duration should NOT be lower than 1000 when chosing "animation: fade"
Methods
-----------------
The following methods are availible publicly:
animate(): perform the desired animation between each ticker message
start(): starts animating the ticker
stop(): halts animating the ticker
Notes
-----------------
Version 1
* Ready for release