导航active

$("#navigation-block a").each(function(){
    $this = $(this);
    if($this[0].href==String(window.location)){
        $("#navigation-block li").removeClass("active");
        $this.parent("li").addClass("active");
    }
});

猜你喜欢

转载自blog.csdn.net/qq_41842440/article/details/80772934