Difference between revisions of "Team:IIT Delhi/team1"
Line 362: | Line 362: | ||
height:149px; | height:149px; | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<link rel="stylesheet" href="https://2015.igem.org/Team:IIT_Delhi/CSS_bootstrap?action=raw&ctype=text/css" type="text/css"/> | <link rel="stylesheet" href="https://2015.igem.org/Team:IIT_Delhi/CSS_bootstrap?action=raw&ctype=text/css" type="text/css"/> | ||
Line 678: | Line 638: | ||
); | ); | ||
}); | }); | ||
− | </script> | + | </script> |
+ | |||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | console.log("hi2"); | ||
+ | /** | ||
+ | * the menu | ||
+ | */ | ||
+ | var $menu = $('#ldd_menu'); | ||
+ | |||
+ | /** | ||
+ | * for each list element, | ||
+ | * we show the submenu when hovering and | ||
+ | * expand the span element (title) to 510px | ||
+ | */ | ||
+ | $menu.children('li').each(function(){ | ||
+ | var $this = $(this); | ||
+ | var $span = $this.children('span'); | ||
+ | $span.data('width',$span.width()); | ||
+ | |||
+ | $this.bind('mouseenter',function(){ | ||
+ | $menu.find('.ldd_submenu').stop(true,true).hide(); | ||
+ | $span.stop().animate({'width':'10%'},200,function(){ | ||
+ | $this.find('.ldd_submenu').slideDown(400); | ||
+ | }); | ||
+ | }).bind('mouseleave',function(){ | ||
+ | /**$this.find('.ldd_submenu').stop(true,true).hide(); */ | ||
+ | $span.stop().animate({'width':$span.data('width')+'px'},300); | ||
+ | $this.find('.ldd_submenu').slideUp(400); | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | //ipad and iphone fix | ||
+ | if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) { | ||
+ | $(" #ldd_menu li a").click(function(){ | ||
+ | //we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event | ||
+ | //strange | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
+ | |||
</body> | </body> | ||
</html> | </html> |
Revision as of 16:48, 12 September 2015
This is content
Meet the Team
ABC
content content
|
DEF
content content
|