Created
August 22, 2011 21:48
-
-
Save nathggns/1163706 to your computer and use it in GitHub Desktop.
An Example Use of my ticker script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('p').ticker({ | |
repeat: true, | |
callback: function(tick) { | |
// tick is the amount of times it has scrolled already. Without repeat: true will always be 1 | |
switch(tick) { | |
case 1: | |
$(this).text('Random News 2'); | |
break; | |
case 2: | |
$(this).text('Random News 3'); | |
break; | |
default: | |
$(this).addClass('stopRepeat'); | |
break; | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment