大小图轮播
作者:互联网
var play; if(!play){ //大小图轮播 var sWidth = $(".briefing .briefingLive").width(); var lens = $(".liveBigImg li").length; var indexs = 0; var liLens = (100 / lens) + "%"; $(".liveBigImg li").css("width", liLens); $(".briefingRight ul li").css({ }).mouseenter(function() { indexs = $(".briefingRight ul li").index(this); showPics(indexs); }).eq(0).trigger("mouseenter"); $(".liveBigImg").css("width", sWidth * (lens)); } function showPics(indexs) { var nowLeft = -indexs * sWidth; $(".liveBigImg").stop(true, false).animate({ "left": nowLeft }, 500); $(".briefingRight ul li").removeClass("focus").eq(indexs).addClass("focus"); }
标签:liveBigImg,轮播,width,li,var,sWidth,大小,indexs 来源: https://www.cnblogs.com/heartY/p/16175611.html