我有以下的插件,它是工作:删除(jQuery的)
(function ($) {
$.fn.slider = function (options) {
var defaults = {
pause: 8000
};
var options = $.extend({}, defaults, options);
$(this).each(function() {
// Ommited code for simplicity
});
return this;
};
})(jQuery);
如果我改变第一和最后一行:
$(function() {
// Inner code
});
不应该在该工作?我最终需要(JQuery)吗?
我认为有一种格式,最后不需要(jQuery)。
我错过了什么?