Difference between revisions of "MediaWiki:Common.js"

From LID SWM Planning and Design Guide
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: $('#myTab a').click(function (e) { e.preventDefault() $(this).tab('show') }) $('a[data-togg...")
 
Line 9: Line 9:
 
   e.relatedTarget // previous active tab
 
   e.relatedTarget // previous active tab
 
})
 
})
 +
 +
jQuery(document).ready(function ($) {
 +
        $('#tabs').tab();
 +
    });

Revision as of 15:32, 19 February 2017

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

$('#myTab a').click(function (e) {
    e.preventDefault()
    $(this).tab('show')
})
$('a[data-toggle="tabs"]').on('shown.bs.tab', function (e) {
  e.target // newly activated tab
  e.relatedTarget // previous active tab
})

jQuery(document).ready(function ($) {
        $('#tabs').tab();
    });