快捷导航

doT.js模板生成的html代码click事件失效

这是js点击变换图片和下拉列表的代码$('#mycarousel li').click(function(){          var $this = $(this);          $('#imgpath').attr('src', $this.find('img').attr('data-original'));             $this.find('img').addClass('actived').parent().siblings().find('img').removeClass('actived');                    $('#plist')[0].selectedIndex = currentPlayIndex;});$('#plist').change(function(){                var $this = $(this);                var selectedIndex = $this.find(':selected').index();                $('#mycarousel li').eq(selectedIndex).trigger('click');});下面是页面html的:图片列表<ul id="mycarousel" >      <script type="text/template" charset="utf-8" id="mycarouseltmp">                                    {{ for(var i=0;i

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

已解决
回复

使用道具 举报

各位大牛来帮帮忙
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP