/ Published in: jQuery
Expand |
Embed | Plain Text
$('nav a').each(function() { var hreflink = $(this).attr("href"); if (hreflink.toLowerCase()==location.href.toLowerCase()) { $(this).addClass('selected'); } });
You need to login to post a comment.
