MediaWiki:Common.js: Difference between revisions

From Objective Earth
No edit summary
No edit summary
Tag: Reverted
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
/* Table of contents */
$(document).ready(function() {
    const mwPagesDiv = $('#mw-pages');
    const firstDivInsideMwPages = mwPagesDiv.find('div:first');
    const newElement = $('.toctitle');
newElement.css('display', '');
    // Insert the new element before the first div inside #mw-pages
    newElement.insertBefore(firstDivInsideMwPages);
});

Revision as of 05:04, 25 August 2023

/* Any JavaScript here will be loaded for all users on every page load. */

/* Table of contents */
$(document).ready(function() {
    const mwPagesDiv = $('#mw-pages');
    const firstDivInsideMwPages = mwPagesDiv.find('div:first');
    const newElement = $('.toctitle');

	newElement.css('display', '');

    // Insert the new element before the first div inside #mw-pages
    newElement.insertBefore(firstDivInsideMwPages);
});