Skip to content

Instantly share code, notes, and snippets.

@cmwelsh
Created October 12, 2011 17:04
Show Gist options
  • Save cmwelsh/1281837 to your computer and use it in GitHub Desktop.
Save cmwelsh/1281837 to your computer and use it in GitHub Desktop.
Twitter feed with scrolling
/* 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();
});
@tommyhutcheson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment