Created
October 12, 2011 17:04
-
-
Save cmwelsh/1281837 to your computer and use it in GitHub Desktop.
Twitter feed with scrolling
This file contains 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
/* Twitter Feed */ | |
jQuery(function ($) { | |
var $twitterList = $('.home-twitter > .inner'); | |
if (!$twitterList.length) { | |
return; | |
} | |
// Twitter list has been filled with data | |
// Start spinning | |
function startRotating() { | |
$twitterList.jCarouselLite({ | |
vertical: true, | |
pause: true, | |
visible: 2, | |
auto: 800, | |
speed: 500 | |
}); | |
} | |
// Get data from Twitter | |
function initialize() { | |
$twitterList. | |
bind('full', startRotating). | |
tweet({ | |
username: "taylorswift13", | |
count: 6, | |
loading_text: "Loading Twitter feed...", | |
template: "{text}" | |
}); | |
} | |
initialize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have added the file to my script folder and added <script src="script/twitter.js" type="text/javascript" ></script> to my head but what do I need to add to the HTML body to call/activate the code form the JavaScript file ?
Cheers