$( function() { $("#test li").click(function(){ $("#test li").removeClass("center"); $(this).addClass("center");
})
});
$( function() { $("#test li").click(function(){ $("#test li").removeClass("center"); $(this).addClass("center");
})
});
转载于:https://www.cnblogs.com/henuyuxiang/p/6693402.html