如何使用jQuery插件方法3实现长尾词搜索功能?
- 内容介绍
- 文章标签
- 相关推荐
本文共计85个文字,预计阅读时间需要1分钟。
以PageSwitch为例,实现以下代码:
javascriptvar PageSwitch=(function() { function PageSwitch(ele, options) { } PageSwitch.prototype={ init: function() { }, PagesCount: function() { } }; return PageSwitch;})();
以PageSwitch为例var PageSwitch=(function(){ function PageSwitch(ele,options){ } PageSwitch.prototype={ init:function(){ }, PagesCount:function(){ } } return PageSwitch; })(); $.fn.PageSwitch=function(options){ return this.each(function(){ var self = this; var instance = self.data('PageSwitch'); if(!instance){ instance = new PageSwitch(self,options); self.data('PageSwitch',instance); } if($.type(options) === 'string'){ return instance[options](); } }); } $.fn.PageSwitch.defaults={ }
本文共计85个文字,预计阅读时间需要1分钟。
以PageSwitch为例,实现以下代码:
javascriptvar PageSwitch=(function() { function PageSwitch(ele, options) { } PageSwitch.prototype={ init: function() { }, PagesCount: function() { } }; return PageSwitch;})();
以PageSwitch为例var PageSwitch=(function(){ function PageSwitch(ele,options){ } PageSwitch.prototype={ init:function(){ }, PagesCount:function(){ } } return PageSwitch; })(); $.fn.PageSwitch=function(options){ return this.each(function(){ var self = this; var instance = self.data('PageSwitch'); if(!instance){ instance = new PageSwitch(self,options); self.data('PageSwitch',instance); } if($.type(options) === 'string'){ return instance[options](); } }); } $.fn.PageSwitch.defaults={ }

