Created
August 1, 2010 17:37
-
-
Save LinuxDoku/503559 to your computer and use it in GitHub Desktop.
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
/** | |
* Slide between 3 tweets in 3 div's. | |
* | |
* @param int display The tweet to start | |
*/ | |
function tweetSlider(display) { | |
if(display == 0) { | |
// hide tweets | |
$('#tweet_1').hide(); | |
$('#tweet_2').hide(); | |
} | |
// scroll out active tweet | |
active = display - 1; | |
if(active == -1) { | |
active = 2; | |
} | |
// PROPABLY BROKEN IN NEW JQUERY | |
//$('#tweet_' + active).hide("slide", { direction: "left", mode: 'hide' }, 500); | |
//$('#tweet_' + display).show("slide", { direction: "right", mode: 'show' }, 500); | |
// so we use this | |
$('#tweet_' + active).hide(); | |
$('#tweet_' + display).fadeIn('slow'); | |
next = display + 1; | |
if(next == 3) { | |
next = 0; | |
} | |
window.setTimeout("tweetSlider(" + next + ");", 6000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment