Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
Line 14: | Line 14: | ||
<ul class="m_menu_right"> | <ul class="m_menu_right"> | ||
<li><a href="/Team:KIT-Kyoto/Test/Parts">Parts</a></li> | <li><a href="/Team:KIT-Kyoto/Test/Parts">Parts</a></li> | ||
- | <li><a href="/Team:KIT-Kyoto/HumanPractice"> | + | <li><a href="/Team:KIT-Kyoto/HumanPractice">HumanPractices</a></li> |
<li><a href="/Team:KIT-Kyoto/Test/Safety">Safety</a></li> | <li><a href="/Team:KIT-Kyoto/Test/Safety">Safety</a></li> | ||
<li><a href="/Team:KIT-Kyoto/Test/Attributions">Attributions</a></li> | <li><a href="/Team:KIT-Kyoto/Test/Attributions">Attributions</a></li> | ||
Line 26: | Line 26: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(function(){ | $(function(){ | ||
- | var | + | var ua = navigator.userAgent; |
- | + | if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){ | |
- | + | $(".m_menu").css("display","none"); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
$(".button-toggle").on("click", function() { | $(".button-toggle").on("click", function() { | ||
$(".m_menu").slideToggle(); | $(".m_menu").slideToggle(); | ||
Line 52: | Line 37: | ||
else {top.fadeIn ();} | else {top.fadeIn ();} | ||
}); | }); | ||
+ | } | ||
}); | }); | ||
$(function(){ | $(function(){ | ||
+ | var ua = navigator.userAgent; | ||
+ | if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){ | ||
+ | $(".accordion").addClass('m-active'); | ||
+ | $(".ac").eq(0).show(); | ||
+ | } | ||
$(".m-active h2 a").click(function(){ | $(".m-active h2 a").click(function(){ | ||
var num = $(".m-active h2 a").index(this); | var num = $(".m-active h2 a").index(this); | ||
Line 62: | Line 53: | ||
}else { | }else { | ||
ac.slideUp(); | ac.slideUp(); | ||
- | } | + | } |
- | }); | + | }); |
}); | }); | ||
</script> | </script> | ||
Line 159: | Line 150: | ||
background: #333; | background: #333; | ||
} | } | ||
- | + | .accordion input{ | |
+ | display:none; | ||
+ | } | ||
@media screen and (max-width: 568px) { | @media screen and (max-width: 568px) { | ||
- | |||
- | |||
- | |||
div#mobilemenu{ | div#mobilemenu{ | ||
display:inline; | display:inline; | ||
Line 287: | Line 277: | ||
.member_img_profile a,.member_img_profile span{ | .member_img_profile a,.member_img_profile span{ | ||
padding:10px 5px 10px 45px; | padding:10px 5px 10px 45px; | ||
- | |||
- | |||
- | |||
- | |||
} | } | ||
Revision as of 16:22, 3 October 2014