Team:UCLA/anuved verma ucla2014 workspace/Javascript
From 2014.igem.org
(Difference between revisions)
Anuvedverma (Talk | contribs) |
Anuvedverma (Talk | contribs) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | ||
+ | |||
+ | <!--SPLASH PAGE--> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $('#box1').hover(function(){ | ||
+ | var smallTop = $('#box1').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | $('#box2').hover(function(){ | ||
+ | var smallTop = $('#box2').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | $('#box3').hover(function(){ | ||
+ | var smallTop = $('#box3').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | $('#box4').hover(function(){ | ||
+ | var smallTop = $('#box4').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!--MAIN PAGE BOXES--> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $('#box5').hover(function(){ | ||
+ | var smallTop = $('#box5').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | $('#box6').hover(function(){ | ||
+ | var smallTop = $('#box6').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | $('#box7').hover(function(){ | ||
+ | var smallTop = $('#box7').height() - $(".cover", this).height() -10 +"px"; | ||
+ | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
+ | }, function() { | ||
+ | $(".cover", this).stop().animate({top:'340px'},{queue:false,duration:160}); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
<!--SIDE NAVIGATION MENU BAR--> | <!--SIDE NAVIGATION MENU BAR--> |
Revision as of 23:41, 5 September 2014