MediaWiki:SupportPage.js: Difference between revisions

Content deleted Content added
No edit summary
rm topmenuheight, not needed here
Line 19:
var lastId,
topMenu = $("#toc > ul"),
topMenuHeight = topMenu.outerHeight()+1,
// All list items
menuItems = topMenu.find("a"),
Line 29 ⟶ 28:
menuItems.click(function(e){
var href = $(this).attr("href"),
offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
$('html, body').stop().animate({
scrollTop: offsetTop
Line 39 ⟶ 38:
$(window).scroll(function(){
// Get container scroll position
var fromTop = $(this).scrollTop()+topMenuHeight;
 
// Get id of current scroll item