Home > jquery-twitter-plugin

jquery-twitter-plugin

Jquery-twitter-plugin is a project mainly written in JavaScript, it's free.

jquery twitter plugin

  • jQuery Twitter 'mini' plugin

Here's a little jQuery plugin for displaying a twitter feed into a web page. The goal was to put my latest 'tweets' on my blog, and also learn jQuery. Ended up making a 'mini' jQuery plugin that can easily be added into any web page.

See more details in [[http://alexandrenotebook.blogspot.com/2010/04/jquery-twitter-mini-plugin.html]]

** Instructions:

Dependency

It depends on jQuery library, so include in your HTML page:

+BEGIN_SRC HTML

+END_SRC

How to Use

Using jQuery pick an html element that you want to use, then call the /twitter(..)/ method giving as arguments the twitter 'user' and a the 'count' of the latest 'tweets' you want to see displayed.

example:

For the html div:

+BEGIN_SRC HTML

+END_SRC

Call:

+BEGIN_SRC javascript

$(function() { $('#twitter').twitter({'user':'al3xandr3','count':3}); });

+END_SRC

New on Version 2.0

Introduced an optional 2nd argument, a callback function that gets called when the twitter data is recieved and processed.

The callback recieves 1 arguments which is the element we are working on(the 'this').

Use like:

+BEGIN_SRC javascript

$('#twitter').twitter({'user': 'al3xandr3', 'count': 3}, function (el) { el.hide().show('slow'); });

+END_SRC