Home > jQuery > Animated anchor on jScrollpane

$('.scrollpane').jScrollPane({
animateScroll: true
});
var scrollpane_api = $('.scrollpane').data('jsp');

$('.scrollpane a[href^=#]').click(function(){
var scroll_top = $('a[name="' + $(this).attr('href').substring(1) + '"]').position().top;
scrollpane_api.scrollTo(0, scroll_top);
return false;
});



Flag Counter