Template:Sifuentes04
From 2014.igem.org
(Difference between revisions)
Line 380: | Line 380: | ||
checkIfActive = 1; | checkIfActive = 1; | ||
$('.accordion-header').next().slideToggle().toggleClass('open-content'); | $('.accordion-header').next().slideToggle().toggleClass('open-content'); | ||
+ | $('.accordion-header').click(function () { | ||
+ | if($(this).is('.inactive-header')) { | ||
+ | $('.active-header').toggleClass('active-header').toggleClass('inactive-header').next().slideToggle().toggleClass('open-content'); | ||
+ | $(this).toggleClass('active-header').toggleClass('inactive-header'); | ||
+ | $(this).next().slideToggle().toggleClass('open-content'); | ||
+ | } | ||
+ | |||
+ | else { | ||
+ | $(this).toggleClass('active-header').toggleClass('inactive-header'); | ||
+ | $(this).next().slideToggle().toggleClass('open-content'); | ||
+ | } | ||
} | } | ||
else { | else { |
Revision as of 18:51, 14 January 2015