Team:UCLA/Template/Javascript
From 2014.igem.org
(Difference between revisions)
Samichaels (Talk | contribs) |
Samichaels (Talk | contribs) |
||
Line 177: | Line 177: | ||
$('#box4').hover(function(){ | $('#box4').hover(function(){ | ||
var smallTop = $('#box4').height() - $(".cover", this).height() -10 +"px"; | 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}); | $(".cover", this).stop().animate({top:smallTop},{queue:false,duration:160}); | ||
}, function() { | }, function() { |
Revision as of 22:52, 2 September 2014