Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
Line 9: | Line 9: | ||
var browserwidth = $(window).width(); | var browserwidth = $(window).width(); | ||
if(browserwidth <= 568){ | if(browserwidth <= 568){ | ||
+ | $('.container').addClass('kit_article'); | ||
+ | }; | ||
+ | }); | ||
+ | (function($){ | ||
$(function(){ | $(function(){ | ||
- | + | var accordionItem=$('.kit_article'); | |
- | var accordionItem=$(' | + | |
- | + | ||
accordionItem.find('.sentence').hide(); | accordionItem.find('.sentence').hide(); | ||
- | |||
- | |||
var no=0; | var no=0; | ||
accordionItem.find('h3').eq(no).addClass('active').next('.sentence').show(); | accordionItem.find('h3').eq(no).addClass('active').next('.sentence').show(); | ||
Line 31: | Line 31: | ||
}); | }); | ||
}); | }); | ||
- | } | + | }); |
- | + | ||
$(function(){ | $(function(){ | ||
checkwidth(); | checkwidth(); | ||
$(window).resize(checkwidth); | $(window).resize(checkwidth); | ||
- | |||
}); | }); | ||
</script> | </script> |
Revision as of 17:14, 21 September 2014