MediaWiki:SupportPage.js: Difference between revisions
Content deleted Content added
change scroll offset again, try to align with top of TOC |
fix Tag: Undo |
||
Line 32:
// Add smooth scrolling effect
var scrollOffset =
scrollDuration = 500, // in ms
smoothScroll = function(event) {
Line 51:
var fromTop = $(this).scrollTop(); // Get container scroll position
var currentSection = toc.filter(function(item) {
return fromTop > item.anchor.offset().top -
});
currentSection = currentSection[currentSection.length - 1];
|