jquery plugin template


/ Published in: jQuery
Save to your folder(s)

A template of a basic jQuery plugin, including over-ridable options


Copy this code and paste it in your HTML
  1. (function($){
  2. $.fn.functionName = function(options) {
  3.  
  4. var options = $.extend({}, options);
  5.  
  6. return $(this).each(function(i) {
  7. //Optionally use the .each() function
  8. });
  9.  
  10. }//end $.fn
  11. })(jQuery);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.