我编写的插件代码如下(function (window, document, Math) { var MyPlugin = function(ele,options){ this.element = ele; this.defaults = { 'anime' : true, 'callback' : { 'after' : '', 'before' : '' } }; this.opts = $.extend({},this.defaults,options); } MyPlugin.prototype = { Start:function(){ console.log('start'); return true; } }})(window, document, Math);我使用var MP = new Myplugin();会一直提示ReferenceError: Can't find variable: Myplugin怎么办,是我哪里写错了吗..
添加回答
举报
0/150
提交
取消