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.


###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.

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

A great resource is the jQuery authoring guide.