So you whant to flood the market with another scrolling slideshow, popup, video enabled jQuery plugin. Here is the syntax plain and simple.
- creat your function that can be used with other libraries by wraping in anonymus function
(function($){ - name the function
$.fn.myfunction(settings){ - extend the function by defining the settings in a JSON object
settings = $.extend({settingA:'defaultA',...}); - start writing all of your
code... - close plugin function
}; - close anonymus wrapper
})(jQuery); - whole thing together
(function($){
$.fn.myFunction(settings){
settings = $.extend({setting_A: 'default_A', setting_B: 'default_B'...});
...code away!
};
}(jQuery);See the file for more explinations and sample plugin.
With all the cheat sheets thay are a work in progress and could contain mistakes. If you find these helpfull or find shit that is just plain wrong, please comment so I can fix.
Thanks
jQuery Plugin Syntax
this is a reference for the syntax to create a jQuery Plugin.
setting.mySettinguse like variable800px x 200pxif you have anything to add to this just comment and I will add to it, thanks for viewing