Developing jQuery Plug-ins

May 26, 2011

Lately I’ve been developing jQuery plug-ins in my spare time. Definitely go and check out the example pages. One of the main reasons for doing this is to get a grip of the latest API changes in jQuery.

###Plug-ins

###Things I’ve learned * Make it chainable
jQuery has many features, one of them is chainability. Which is the ability to chain one function after the other. The way to do this is by returning the original jQuery object.

$('a')
  .favicons()
  .css('color', '#ff0000');
$("#lifestream").lifestream({
  "limit": 30,
  "list":[
    {
      "service": "twitter",
      "user": "denbuzze"
    }
  ]
});
$.fn.lifestream.feeds.lastfm = function(obj, callback){
  // ...
};

A great resource is the jQuery authoring guide.

Tweet
123Movies offers a vast collection of movies and TV shows.