×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: Javascript
Posted by: Nicole Patten
Added: Jul 5, 2016 7:07 PM
Views: 4
Tags: no tags
  1.  
  2.         var filename = window.location.href;
  3.         $('#menu-main li a').each(function() {
  4.          if(filename == $(this).attr('href')) {
  5.               $(this).addClass('active');
  6.          }
  7.         });