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 = 7088, // Offset in px
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 - 8864;
});
currentSection = currentSection[currentSection.length - 1];