MediaWiki:SupportPage.js: Difference between revisions
Content deleted Content added
No edit summary |
new toc code |
||
Line 14:
$(function() {
/*
// Build a list of corresponding toc links and anchors
toc.push({
anchor: $( document.getElementById(id) )
//
var scrollOffset = 24, // Offset in px
var offsetTop = event.data.anchor.offset().top;
scrollTop: offsetTop - scrollOffset
for (var i = 0; i < toc.length; i++) {
toc[i].link.on( 'click', toc[i], smoothScroll );
}
var lastSection;
▲ // var id = $(this).attr('href').replace('#', '');
currentSection = currentSection[currentSection.length - 1];
▲ // e.preventDefault();
if ( lastSection !== currentSection ) {
▲ // });
lastSection = currentSection;
currentSection.link.addClass('-active');
}
});
/* -- end of table of contents code -- */
▲ // /* Highlighting current section in TOC */
▲ // $(window).scroll(function(){
▲ // return this;
▲ // }
▲ // });
▲ // .removeClass('-active')
▲ // }
▲ // });
/*!
|