/**
* jquery.timeline.js plugin
*
*
*
*
*/
;(function($, window, document, undefined) {
var plugName = "timeline",
defaults = {
name: "hwb"
};
function TimeLine(data,el,options) {
this.name = plugName;
this.data = data;
this.$el = el;
this.defaults = $.extend({}, defaults, options);
this.init();
}
TimeLine.prototype = {
init: function() {
console.log(this.$el[0]);
}
}
$.fn.extend({
timeline: function(data,options) {
return this.each(function() {
new TimeLine(data,$(this),options);
})
}
})
})(jQuery, window, document);
面向对象编写jQuery插件
最新推荐文章于 2020-09-22 09:44:38 发布