Message highlight when nav to from message link

댓글

댓글 1개

  • Jeffrey589

    To highlight the anchor( from the list item) ,we are going to simply add class "active" to it and its background will be blue and the text will turn white.

     

    Now to add the "active" class to the specific navigation item we will write this jquery code.

     

    $(document).ready(function(){

     

     

        $('nav a[href^="/' + location.pathname.split("/")[1] + '"]').addClass('active');

     

    });

     

    Kantime Healthcare Software

    0

댓글을 남기려면 로그인하세요.