為什么要var _this_ = this呢,不能直接在下面new Carousel嗎?
var?_this_?=?this; posters.each(function?()?{ ????new?_this_($(this)); });
為什么不能這樣
posters.each(function?()?{ ????new?Carousel($(this)); });
謝謝回答的人
var?_this_?=?this; posters.each(function?()?{ ????new?_this_($(this)); });
為什么不能這樣
posters.each(function?()?{ ????new?Carousel($(this)); });
謝謝回答的人
2016-05-03
舉報
2016-05-23
這樣耦合程度更低吧。
2016-05-09
你的方法是可以的