MediaWiki:Gadget-SidebarTOC.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
mw.loader.using( 'mediawiki.toc', function () { | mw.loader.using( 'mediawiki.toc', function () { | ||
$( function () { | $( function () { | ||
var $ | var $tocContainer = $( '<div>' ) | ||
.addClass( 'mw-table-of-contents-container' ) | |||
.appendTo( '#mw-content' ); // Append the ToC container under the content area | |||
var $floatTOC = $( '.toc' ) | |||
.clone() | .clone() | ||
.removeAttr( 'id' ) | .removeAttr( 'id' ) | ||
.addClass( ' | .addClass( 'vector-sticky-toc-container' ) | ||
.appendTo( | .appendTo( $tocContainer ); // Append the cloned ToC inside the ToC container | ||
}); | |||
}); | }); |
Revision as of 06:49, 22 February 2024
mw.loader.using( 'mediawiki.toc', function () {
$( function () {
var $tocContainer = $( '<div>' )
.addClass( 'mw-table-of-contents-container' )
.appendTo( '#mw-content' ); // Append the ToC container under the content area
var $floatTOC = $( '.toc' )
.clone()
.removeAttr( 'id' )
.addClass( 'vector-sticky-toc-container' )
.appendTo( $tocContainer ); // Append the cloned ToC inside the ToC container
});
});