其他分享
首页 > 其他分享> > 给每个li添加样式时延时效果(setInterval,clearInterval)

给每个li添加样式时延时效果(setInterval,clearInterval)

作者:互联网

function temp() {

                if (i > pagesl.length - 1) {
                    clearInterval(id)
                    console.log('终止')
                    that.bottomAnime(true);
                } else {
                    $(pagesl[i].children[0]).css({ visibility: "initial" });
                    $(pagesl[i].children[0]).show()
                    $(pagesl[i].children[0]).addClass('animate__animated animate__fadeInUpBig');
                    i++;
                }

            }
            var id = setInterval(temp, 200)

标签:__,pagesl,setInterval,clearInterval,li,id,animate,children
来源: https://www.cnblogs.com/zy-simpleboy/p/14980185.html