Following code has been tested with jQuery 1.3 .

Recently I was discussing how to create a jQuery plugin with a friend of mine. In the end I had a base code that should work as a starting point of any jQuery plugin.

Take a look here .