Hi,
I want to add class to <a>
, what has some url. For exampe :
$(document).ready(function() {
var pathname = window.location.pathname;
$(".navholder ul li a").each(function() {
$(this).addClass('sel');
});
});
I want to add "sel"
class to <a>
what has href=pathname
.
Theoretically something like this :
$(".navholder ul li a").attr('href', pathname).addClass('sel');
Thanks!