Array

MediaWiki:Common.js: Difference between revisions

m (Reverted edit by SpencerMarsh (talk) to last revision by MikeParker)
Tags: Blanking Rollback
No edit summary
Line 1: Line 1:
 
  // Collapse Notes section when clicking on back-to-text links from references
  $(document).on('click', '.mw-cite-backlink a, .references .cite-backlink a, ol.references a[href^="#cite_ref-"]', function(e) {
      // Check if Notes content exists and is visible
      if (notesContent.length > 0 && notesContent.is(':visible')) {
          // Collapse the Notes section
          notesContent.slideUp(150);
      }
      // Allow the link to work normally (don't prevent default) - it will scroll to the citation in the text
  });

Revision as of 20:50, 13 January 2026

  // Collapse Notes section when clicking on back-to-text links from references
  $(document).on('click', '.mw-cite-backlink a, .references .cite-backlink a, ol.references a[href^="#cite_ref-"]', function(e) {
      // Check if Notes content exists and is visible
      if (notesContent.length > 0 && notesContent.is(':visible')) {
          // Collapse the Notes section
          notesContent.slideUp(150);
      }
      // Allow the link to work normally (don't prevent default) - it will scroll to the citation in the text
  });