1
/**
2
* jQuery.marquee - scrolling text like old marquee element
3
* @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
4
*/;
5
(function($) {
6
$.fn.marquee = function(options) {
7
return this.each(function() {
8
// Extend the options if any provided
9
var o = $.extend({}, $.fn.marquee.defaults, options),
10
$this = $(this),
11
$marqueeWrapper, containerWidth, animationCss, verticalDir, elWidth,
12
loopCount = 3,
13
playState = 'animation-play-state',
14
css3AnimationIsSupported = false,
15
16
// Private methods
17
_prefixedEvent = function(element, type, callback) {
18
var pfx = ["webkit", "moz", "MS", "o", ""];
19
for (var p = 0; p < pfx.length; p++) {
20
if (!pfx[p]) type = type.toLowerCase();
21
element.addEventListener(pfx[p] + type, callback, false);
22
}
23
},
24
25
_objToString = function(obj) {
26
var tabjson = [];
27
for (var p in obj) {
28
if (obj.hasOwnProperty(p)) {
29
tabjson.push(p + ':' + obj[p]);
30
}
31
}
32
tabjson.push();
33
return '{' + tabjson.join(',') + '}';
34
},
35
36
_startAnimationWithDelay = function() {
37
$this.timer = setTimeout(animate, o.delayBeforeStart);
38
},
39
40
// Public methods
...
</html>