a 添加href后当前栏目如何高亮显示

//nav
$(".nav li a").each(function() {
$this = $(this);
if ($this[0].href == String(window.location)) {
$this.parent().addClass("active");
}
});

posted @ 2016-12-19 14:17  简单就好zyx  阅读(352)  评论(0编辑  收藏  举报