views:

54

answers:

6

Hi,

I wanted to create simple plugin using jquery. Also suggest me standard practice while writing jquery plugin.

Please folks suggest me some better pointers.

Thanks,

-Pravin

+3  A: 

a good starting pattern looks like:

;(function($){
   $.fn.yourplugin = function() {
   };
}(jQuery));
jAndy
+4  A: 

take a look at this (very short and easy) or this.

oezi
A: 

Have you lookied at http://docs.jquery.com/Plugins/Authoring

madsleejensen
+1  A: 

A wrote step-by-step guide on how to create practical drop shadow jquery plugin you may want to check out here:

With very simple code, you create fully functional jQuery plugin.

Sarfraz
A: 

I recommend that you have a look here: http://docs.jquery.com/Plugins/Authoring

Nisse