I’m going to cheat slightly.
I’m going to start jQuery week off with implementing a Twitter feed (instead of a Vimeo feed). Twitter is the easiest, so we can build up to the harder stuff. Hopefully after you read this post, you won’t feel slighted, either.
Obviously, you’ll need to go to jQuery.com and download the jQuery library.
Then, you’ll want to head over to Sea of Clouds and download their Twitter plugin. Their documentation is pretty straightforward. But, I’ll walk through the implementation process with you.
In the head of your HTML document, you’ll want to link up all the files
<link href="jquery.tweet.css" media="all" rel="stylesheet" type="text/css"/>
Then, where you want the Twitter feed to appear, you’ll need to create some kind of hook. For example:
Next, you’ll initialize the Twitter plugin:
auto_join_text_default: "I said,",
auto_join_text_ing: "I were",
auto_join_text_reply: "I replied to",
auto_join_text_url: "I were checking out",
loading_text: "loading tweets..."
The hook you created, is what you will use to call the
The cool thing about this plugin is you can also perform a Twitter Search feed. When you initialize the plugin, you would use the following code instead:
loading_text: "searching twitter..."
Now, everyone who mentioned amyhaywood.com in their Twitter would appear.
Lastly, you can pass an array into the username field. So, if you wanted more than one user’s tweets to appear, it would automatically sort them by time.
username: ["ahaywood", "shaywood", "dgirardier", "awakeland3d", "lecampbell"],
I told you this one was pretty easy. Next up? YouTube on Thursday.