Can be fixed class called active in this script?
toplisek opened this issue · 2 comments
toplisek commented
Check example:
jQuery(document).ready(function()
{
jQuery('a[href*=#]:not([href=#])').click(function()
{
if (location.pathname.replace(/^//, '') == this.pathname.replace(/^//, '') && location.hostname == this.hostname) {
var target = jQuery(this.hash);
target = target.length? target: jQuery('[name=' + this.hash.slice(1) +']');
if (target.length) {
jQuery('html,body').animate(
{
scrollTop: target.offset().top
}, 1000
);
return false;
}
}
jQuery('site-header > ul.navbar-nav li').click(function(e)
{
jQuery('.nav li.active').removeClass('active');
var jQuerythis = jQuery(this);
jQuerythis.addClass('active');
e.preventDefault();
}
);
}
);
}
);
kswedberg commented
I'm not sure what you're asking for.
kswedberg commented
Closing due to inactivity.