通过手动点击,动态获取图片索引,并跳转到指定图片;
可以在执行mui('.mui-slider').slider().gotoItem(index);报错Uncaught TypeError: Cannot read property '0' of undefined;
经过测试发现gotoItem()参数必须为数字,要不然就会报错;
修改为:mui('.mui-slider').slider().gotoItem(parseInt(index)); 问题解决!

3***@qq.com
- 发布:2017-10-17 23:36
- 更新:2017-10-17 23:36
- 阅读:2698
图片轮播动态跳转报错 Uncaught TypeError: Cannot read property '0' of undefined
分类:MUI
0 个评论
要回复文章请先登录或注册