Picture transition animation

  $(function () {
            var i = 0;
            var a = 0;
            $(".goLeft").click(function () {
                i++;
                if (i >= 3) {
                    i = 0;
                }
                $(".prolist_content").animate({
                    "left": (-584) * i + "px"
                });
            });

            $(".goRight").click(function () {
                a--;
                if (a < 0) {
                    a = 2;
                }
                $(".prolist_content").animate({
                    "left": (-584) * a + "px"
                })
            })
        })
        $(function () {
            $(".num li").bind("click mouseover", function () {
                var index = $(this).index();
                $(".silder").animate({
                    "top": (-150) * index + "px"
                });
                $(this).addClass("on").siblings().removeClass("on");
            })
        })
        $(function () {
            setInterval(function () {
                $(".scrollNews li:first").remove().appendTo($(".scrollNews ul"));

            },1000)
        })

Guess you like

Origin blog.csdn.net/Charles_hui/article/details/108915915