var currentLink = menu.find(".current"); if (currentId && currentLink.attr("href") != currentId) { currentLink.removeClass("current"); menu.find("[href=" + currentId + "]").addClass("current");
var currentLink = menu.find(".current");
if (currentId && currentLink.attr("href") != currentId) {
currentLink.removeClass("current");
menu.find("[href=" + currentId + "]").addClass("current");
}
这里的if里面不是应该写成currentId!=""&¤tLink.attr("href")!=currentId吗?