$(".wdTypeMenu a").hover(function(){
var _index = $(this).index();//获取下标(索引值)
$(this).addClass("wdTypeMenuColor").siblings().removeClass("wdTypeMenuColor");
$(".typeMenuListAll .typeMenuList").eq(_index).addClass("show").siblings().removeClass("show");
})
window.onload = function() {
var idx = $(".wdTypeMenu").children(".wdTypeMenuColor").index();
$(".typeMenuListAll .typeMenuList").eq(idx).addClass("show").siblings().removeClass("show");
}
var idx = $(".wdTypeMenu").children(".wdTypeMenuColor").index();
$(".wdTypeMenu"):找到类名为wdTypeMenu的容器;
children(".wdTypeMenuColor"):找到类名为wdTypeMenu的容器下面类名为wdTypeMenuColor的子元素;
index():获取指定元素的下标