MediaWiki:Common.js: Difference between revisions

Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: mw.loader.using(['jquery'], function () { $('h2').each(function () { // ONLY targets h2 (Subheading 1) var $heading = $(this); var $content = $heading.nextUntil('h2'); // Stops at the next h2 if ($content.length) { var $toggle = $('<span class="toggle-link" style="cursor: pointer; color: blue; margin-left: 10px;">[+]</span>'); $heading.appen..."
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: mw.loader.using(['jquery'], function () { $('h2').each(function () { // ONLY targets h2 (Subheading 1) var $heading = $(this); var $content = $heading.nextUntil('h2'); // Stops at the next h2 if ($content.length) { var $toggle = $('<span class="toggle-link" style="cursor: pointer; color: blue; margin-left: 10px;">[+]</span>'); $heading.appen...")
(No difference)