MediaWiki:SupportPage.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
remove old language bar code
Do smoothScroll on all fragment links, not just toc ones. Should really find a better way to do this though
Line 47: Line 47:
/* -- table of contents code -- */
/* -- table of contents code -- */
// Build a list of corresponding toc links and anchors
// Build a list of corresponding fragment links and anchors
var toc = [];
var toc = [];
$('#toc > ul a').each( function() {
$('.sp-page [href^="#"]').each( function() {
var id = $(this).attr('href').replace('#', '');
var id = $(this).attr('href').replace('#', '');
toc.push({
toc.push({