我可以将下面的代码重写为不太重复的代码吗?.removeClass对多个项目?
$("#iTUNES").click(function()
{
createLastEdition(26);
$("#Beatport").removeClass("Active");
$("#Spotify").removeClass("Active");
$("#Youtube").removeClass("Active");
$("#iTunes").addClass("Active");
});
例如像这样
$("#Beatport","#Spotify,"#Youtube").removeClass("Active")
?
因此,'$( “#Beatport,Spotify的#,#的Youtube”)。removeClass(“活动“)' – underscore
可能重复的[如何选择多个jQuery对象?](http://stackoverflow.com/questions/18132648/how-to-select-multiple-jquery-objects) – isherwood