What to do when iscroll instantiates an unknown number of content blocks?
高洛峰
高洛峰 2017-05-16 13:38:23
0
1
457

When there are multiple classes of the same class: What should I do when iscroll instantiates an unknown number of content blocks? What should I do if I only write one instance and only the first content will take effect? ​​Do I need to write a for loop? how to write?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
仅有的幸福

<script>

    var iscroll = document.getElementsByClassName("my-iscroll-wrapper");
    for (var i = 0; i < iscroll.length; i++) {
        var myScroll = new IScroll(iscroll[i], {
            //代码块
        });
    }
</script>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template