摘要:
记录下编写jquery插件的两种写法:写法一:View Code (function($){ $.fn.hoverAlert = function(options){ var def ={message:'haha'}; options = $.extend(def,options); $(this).bind("mouseover",function(){ alert(options.message); } });})(jQuery); 写法二:View Code (function($){ $.fn.extend({ function(op... 阅读全文