Message highlight when nav to from message link

Kommentare

1 Kommentar

  • 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

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.