Skip to content

Instantly share code, notes, and snippets.

@nathggns
Created August 22, 2011 21:48
Show Gist options
  • Save nathggns/1163706 to your computer and use it in GitHub Desktop.
Save nathggns/1163706 to your computer and use it in GitHub Desktop.
An Example Use of my ticker script
$('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