0
(function($, window) {
$.fn.slideInterval = function(options) {
return this.each(function() {
$(this).css({overflow: "hidden"})
var slider = {
self: this,
init:function(options, elem) {
self.elem = elem;
self.$elem = $(elem);
slider.action()
},
action:function() {
slider.moved.call(slider.self)
},
moved:function() {
console.log(options.fade) // options.fade is undefined
}
}
slider.init(options, this);
});
};
$.fn.slideInterval.options = function() {
var options = $.extend({
fade: 5,
ImgSlide: null,
interval: null,
bullet: 'default',
context: 'Your Title'
})(options);
};
})(jQuery, window);
我有一些問題,當我調用slider.fade內滑塊方法,但不起作用。如何獲得滑塊對象方法內的選項對象屬性.....?jquery插件將屬性傳遞給另一個對象不起作用
.............................................. .................................................. .................................................. .......