Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
Line 21: | Line 21: | ||
accordionItem.find('.sentence').hide(); | accordionItem.find('.sentence').hide(); | ||
var no=0; | var no=0; | ||
- | accordionItem.find(' | + | accordionItem.find('h2').eq(no).addClass('active').next('.sentence').show(); |
//click-action | //click-action | ||
- | accordionItem.find(' | + | accordionItem.find('h2').click(function () { |
//slide | //slide | ||
Line 31: | Line 31: | ||
//activeクラス切り替え | //activeクラス切り替え | ||
$(this).toggleClass('active'); | $(this).toggleClass('active'); | ||
- | $(this).siblings(' | + | $(this).siblings('h2').removeClass('active'); |
}); | }); |
Revision as of 17:18, 21 September 2014