I am trying to adjust the speed of a page jump, here is the jQuery I have:
$(document).scroll(function(){
var elem = $('.subnav');
if (!elem.attr('data-top')) {
if (elem.hasClass('navbar-fixed-top'))
return;
var offset = elem.offset()
elem.attr('data-top', offset.top);
}
if (elem.attr('data-top') - elem.outerHeight() <= $(this).scrollTop() - $(elem).outerHeight())
elem.addClass('navbar-fixed-top');
else
elem.removeClass('navbar-fixed-top');
});
I just cant seem to work out where to add:
900, 'swing', function () {
window.location.hash = target;
Or something simliar.