Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<head> | <head> | ||
<meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | <meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | ||
+ | <script type="text/javascript"> | ||
+ | $(function(){ | ||
+ | var ua = navigator.userAgent; | ||
+ | if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){ | ||
+ | $(".accordion label").click(function(){ | ||
+ | $(".ac").animate({'height':'auto'},'slow','swing'); | ||
+ | $(".accordion h2::after").css({'margin-top':'-3px','-webkit-transform':'rotate(-45deg)','transform':'rotate(-45deg)'}); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
<style type="text/css"> | <style type="text/css"> | ||
.accordion input{ | .accordion input{ | ||
Line 80: | Line 90: | ||
z-index:10; | z-index:10; | ||
} | } | ||
- | .accordion | + | .accordion h2 { |
position: relative; | position: relative; | ||
display: block; | display: block; | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
- | .accordion | + | .accordion h2::after { |
position: absolute; | position: absolute; | ||
top: 50%; | top: 50%; | ||
Line 103: | Line 113: | ||
height: 0; | height: 0; | ||
overflow: hidden; | overflow: hidden; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
Revision as of 18:19, 21 September 2014