标签:each log var att div anim UNC query this
$(document).ready(function() { var index = $(".picScroll ul li[class=‘on‘]").index; var oPic = $(‘.picScroll‘).find(‘ul‘); var len = $(".picScroll ul li").length; for (var i = 0; i < len; i++) { $(‘.picScroll ul‘).each(function() { var classlen = $(this).find(‘li‘).eq(i).attr(‘class‘); if (classlen == "on") { console.log(i); oPic.animate({ left: -i * 162 }) } }) } });
标签:each log var att div anim UNC query this
原文地址:https://www.cnblogs.com/wangyuxue/p/13377617.html