Team:UCLA/Template/Javascript
From 2014.igem.org
(Difference between revisions)
Samichaels (Talk | contribs) |
Samichaels (Talk | contribs) |
||
Line 91: | Line 91: | ||
</script> | </script> | ||
- | <!-- | + | <!--SPIDER TOP BUTTON--> |
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | jQuery(document).ready(function($){ | |
- | + | $('.spiderbutton').click(function(){ | |
- | + | $("html, body").animate({ scrollTop: 0 }, 500); | |
- | + | $('.spiderbutton').animate({ top: '-=90%'}, 800, function(){$('.spiderbutton').animate({ top: '+=90%'}, 3000)}); | |
- | + | $('.spiderline').animate({ top: '-=90%'}, 800, function(){$('.spiderline').animate({ top: '+=90%'}, 3000)}); | |
- | + | }); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | function | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
</script> | </script> | ||
Line 207: | Line 155: | ||
}); | }); | ||
</script> | </script> | ||
+ | |||
+ | <!--SIDE NAVIGATION MENU BAR--> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | $("#side_menu").mouseenter(function(){ | ||
+ | $("#side_menu").animate({ | ||
+ | left:'0px', | ||
+ | }); | ||
+ | }).mouseleave(function(){ | ||
+ | $("#side_menu").animate({ | ||
+ | left:'-110px', | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!--TOP NAVIGATION MENU BAR--> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $("#menu > li > ul").hide(); | ||
+ | $("#menu > li").mouseenter(function() { | ||
+ | $(this).children("li > ul").stop(true,true).slideDown(350); | ||
+ | }); | ||
+ | $("#menu > li").mouseleave(function() { | ||
+ | $(this).children("li > ul").stop(true,true).slideUp(350); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
</html> | </html> |
Revision as of 22:13, 15 September 2014