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=$('#kit_article');
+
-
//一旦全部消す
+
accordionItem.find('.sentence').hide();
accordionItem.find('.sentence').hide();
-
 
-
//active要素を指定して開く
 
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