index获得jq数组下标

$(".menu").live("click",function(){
for(var j=0;j<menu.length;j++){
menu[j].style.backgroundColor="#2B3642";
}
$(this).css("background-color","#3c6c90");
var menuIdx=$(".menu").index($(this));//获得下标
posted @ 2015-12-08 10:39  小贱贱!  阅读(1484)  评论(0)    收藏  举报