$(document).ready(function () { $(".tab-hd span").click(function () { var inds = $(this).index(); $(this).addClass("cur").siblings().removeClass("cur"); $(this).parent().siblings(".tab-bd").children(".bd").eq(inds).stop(false, true).fadeIn().siblings().hide(); }) //$(".spewlc li").hover(function () { // var ind = $(this).index(); // $(this).stop(false, true).animate({ left: (ind * 19) + "%", width: "43%" }); // $(this).prevAll("li").each(function (index, element) { // var silc = $(this).index(); // $(this).stop(false, true).animate({ left: (silc * 19) + "%", width: "19%" }); // }); // $(this).nextAll("li").each(function (index, element) { // var cilc = $(this).index(); // $(this).stop(false, true).animate({ left: ((cilc - 1) * 19 + 43) + "%", width: "19%" }); // }); //}) $(".num4 li").hover(function () { var ind = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); $(this).stop(false, true).animate({ left: (ind * 19) + "%", width: "43%" }); $(this).prevAll("li").each(function (index, element) { var silc = $(this).index(); $(this).stop(false, true).animate({ left: (silc * 19) + "%", width: "19%" }); }); $(this).nextAll("li").each(function (index, element) { var cilc = $(this).index(); $(this).stop(false, true).animate({ left: ((cilc - 1) * 19 + 43) + "%", width: "19%" }); }); }) $(".num3 li").hover(function () { var ind = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); $(this).stop(false, true).animate({ left: (ind * 20) + "%", width: "60%" }); $(this).prevAll("li").each(function (index, element) { var silc = $(this).index(); $(this).stop(false, true).animate({ left: (silc * 20) + "%", width: "20%" }); }); $(this).nextAll("li").each(function (index, element) { var cilc = $(this).index(); $(this).stop(false, true).animate({ left: ((cilc - 1) * 20 + 60) + "%", width: "20%" }); }); }) $(".denlsc li:nth-child(3n),.dcsenl li:nth-child(3n),.trewnl li:nth-child(2n),.dolsma li:nth-child(3n)").css({ marginRight: "0" }); $(".lbcs-cont li").each(function (index, element) { if ($(this).children("p").length > 0) { $(this).addClass("pick") } }); $(".lbcs-cont li p a.on").parent().show().siblings("a").addClass("cur"); $(".lbcs-cont li > a").click(function () { if ($(this).siblings("p").length > 0) { $(this).addClass("cur").siblings("p").stop(false, true).slideDown().parent().siblings().children("a").removeClass("cur").siblings("p").stop(false, true).slideUp();; } }); $(".lenolsa li:eq(0)").children(".dolsca").addClass("on").siblings().show(); $(".dolsca").click(function () { if ($(this).siblings(".lourew").length > 0) { $(this).addClass("on").siblings().stop(false, true).slideDown().parent().siblings().children(".dolsca").removeClass("on").siblings().stop(false, true).slideUp(); } }) $("img").each(function () { var thisObj = $(this); var src = thisObj.attr("src"); if (src.indexOf('http://www.xmlq.com.cn') > -1) { thisObj.attr("src",src.replace('http://www.xmlq.com.cn','')); } }) });