问答详情
源自:2-1 基本JS、JQ开发结构搭建

为什么加入Carousel.init之后, 不能弹出窗口?

Carousel.init = function(posters){


var _this_ = this;       // this 值得是 Carousel;


posters.each(function(){


new _this_($(this));      // this 指的是 poster

});



};

运行也米有错误。。。 求解答。

提问者:klary 2015-09-02 10:36

个回答

  • 悄猫猫3248503
    2016-12-22 14:06:18

    html里面,Carousel.init($(".J_Poster"));  class类名要加上".",我也犯了这个错误,找了好久                               

  • 喂喂喂不要这样
    2015-12-16 17:37:59

    可能在你的html中的$(function(){    });里没有调用吧