Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
Line 10: | Line 10: | ||
var accordionItem=$('#kit_article'); | var accordionItem=$('#kit_article'); | ||
//一旦全部消す | //一旦全部消す | ||
- | accordionItem.find(' | + | accordionItem.find('.sentence').hide(); |
//active要素を指定して開く | //active要素を指定して開く | ||
var no=0; | var no=0; | ||
- | //accordionItem.find('h3').eq(no).addClass('active').next(' | + | //accordionItem.find('h3').eq(no).addClass('active').next('.sentence').show(); |
//click-action | //click-action | ||
Line 20: | Line 20: | ||
//slide | //slide | ||
- | $(this).next(' | + | $(this).next('.sentence').slideToggle('slow') |
- | .siblings(' | + | .siblings('.sentence:visible').slideUp('slow'); |
//activeクラス切り替え | //activeクラス切り替え | ||
$(this).toggleClass('active'); | $(this).toggleClass('active'); | ||
Line 28: | Line 28: | ||
}); | }); | ||
}); | }); | ||
- | } | + | }; |
}); | }); | ||
Revision as of 16:59, 21 September 2014