Megha bawa1 (Talk | contribs) |
Megha bawa1 (Talk | contribs) |
||
Line 609: | Line 609: | ||
var target = $(this).data('target'); | var target = $(this).data('target'); | ||
− | // First collapse all of them | + | if (first) { |
− | + | first = false; | |
− | + | $('#' + target).collapse('show'); | |
− | + | } else { | |
− | + | // First collapse all of them | |
+ | for (var i = 0; i < medals.length; i++) { | ||
+ | var collapseElementSelector = '#' + medals[i] + '-collapse'; | ||
+ | console.log('hiding ' + collapseElementSelector) | ||
+ | $(collapseElementSelector).collapse('hide'); | ||
− | + | // prevents html moving around on the page, show the collapse when the last one is closed | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
if (i == medals.length - 1) { | if (i == medals.length - 1) { | ||
console.log('queueing show collapse'); | console.log('queueing show collapse'); |
Revision as of 00:06, 21 October 2019
Medals
Bronze
Silver
Gold
Special
Sponsors