kswedberg/jquery-smooth-scroll

Can be fixed class called active in this script?

toplisek opened this issue · 2 comments

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();
 }
);

}
);
}
);

I'm not sure what you're asking for.

Closing due to inactivity.