Carousel 的传参
我是菜鸟,请教老师,别笑话我的弱智问题哦
-------
var Carousel = function(poster){}
-------
在代码的第一句的参数poster,它的实参是怎么传递进来的,在代码里找不到调用它的对象
我的理解是在插件的最后一段中的new _this_($(this));由构造函数实例化_this_这个对象来传递参数给变量 Carousel,不知道我的理解是否正确
Carousel.init = function(posters){
var _this_ = this;
posters.each(function(){
new _this_($(this));
});
};
-----------
老师可以留下微信号,或者邮箱什么的,方便请教哦。