菜单中所有链接里突出显示当前页面链接

$(function(){
$("a").each(function(){
if ($(this).attr("href") == window.location.pathname){
$(this).addClass("selected");
}
});
});

 

posted on 2012-01-31 16:36  tianyaxiang  阅读(198)  评论(0编辑  收藏  举报

导航