MediaWiki:Common.js
From Warzone Wiki
(Difference between revisions)
m (Created page with "/* Any JavaScript here will be loaded for all users on every page load. */ jQuery(document).ready(function($){ - →for collapsible navboxes: toggleHeader = function(index) { ...") |
m |
||
Line 8: | Line 8: | ||
$('.navbox').each(function(index){ | $('.navbox').each(function(index){ | ||
$(this).attr('id', 'navbox-' + index); | $(this).attr('id', 'navbox-' + index); | ||
+ | }); | ||
+ | |||
+ | $('.navbox-content').each(function(index){ | ||
+ | $(this).attr('id', 'navbox-content-' + index); | ||
}); | }); | ||
}); | }); |
Revision as of 10:34, 25 August 2011
/* Any JavaScript here will be loaded for all users on every page load. */ jQuery(document).ready(function($){ /* for collapsible navboxes */ toggleHeader = function(index) { $('#navbox-' + index + '#navbox-content-' + index).toggle('slow'); }; $('.navbox').each(function(index){ $(this).attr('id', 'navbox-' + index); }); $('.navbox-content').each(function(index){ $(this).attr('id', 'navbox-content-' + index); }); });