Difference between revisions of "MediaWiki:Common.js"
From The Grove - Academia de Idiomas
Line 3: | Line 3: | ||
(function() { | (function() { | ||
− | $('.acc div').addClass('hide'); | + | $('.acc div.subAcc').addClass('hide'); |
− | $('div.acc').on('click', ' | + | $('div.acc').on('click', 'h2', function() { |
$(this) | $(this) | ||
.next() | .next() | ||
.slideToggle(200) | .slideToggle(200) | ||
− | .siblings('div') | + | .siblings('div.subAcc') |
.slideUp(200); | .slideUp(200); | ||
}); | }); | ||
})(); | })(); |
Revision as of 14:10, 26 March 2014
/* Any JavaScript here will be loaded for all users on every page load. */ (function() { $('.acc div.subAcc').addClass('hide'); $('div.acc').on('click', 'h2', function() { $(this) .next() .slideToggle(200) .siblings('div.subAcc') .slideUp(200); }); })();