// 控制小图标列表的个数 $(".m-pic2 li").each(function(i) { $(".m-pic2 li").slice(i * 12, i * 12 + 12).wrapAll("<ul class='ul-pic1'></ul>"); });