;(function($, window, document,undefined) {varBeautifier =function(Ele, opt) {//Creating Objects This. $element = Ele,//Accept JQ Objects This. defaults = {//Default Parameters' Color ': ' Red ', ' FontSize ': ' 12px ', ' textdecoration ': ' None ' }, This. Options = $.extend ({}, This. defaults, opt)//passed parameters and default parameters are merged} beautifier.prototype= {//Object Add MethodBeautify:function() { return This. $element. css ({' Color ': This. Options.color,' FontSize ': This. Options.fontsize,' TextDecoration ': This. options.textdecoration}); }} $.fn.myplugin=function(options) {//add the object's methods to the jquery method varBeautifier =NewBeautifier ( This, options);//externally transmitted JQ objects and User Configuration returnBeautifier.beautify ();//Calling Object Methods}}) (JQuery, window, document);
jquery Plugin Development