Template:Team:KIT-Kyoto/hidelogo
From 2014.igem.org
(Difference between revisions)
(53 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | $( | + | var checkheight = function() { |
+ | var browserheight = $(window).height(); | ||
+ | |||
+ | if(browserheight <= 730){ | ||
+ | $('.toplogo').addClass('hidelogo'); | ||
+ | $('.toplogo').removeClass('showlogo'); | ||
+ | }else{ | ||
+ | $('.toplogo').removeClass('hidelogo'); | ||
+ | $('.toplogo').addClass('showlogo'); | ||
+ | } | ||
setTimeout(function(){ | setTimeout(function(){ | ||
- | $(". | + | $(".hidelogo img").animate({'margin-top':'-40px','margin-bottom':'-65px'},800,'linear'); |
},3000); | },3000); | ||
+ | |||
+ | setTimeout(function(){ | ||
+ | $(".showlogo img").animate({'margin-top':'14px','margin-bottom':'-10px'},800,'linear'); | ||
+ | },1000); | ||
+ | }; | ||
+ | |||
+ | $(function(){ | ||
+ | checkheight(); | ||
+ | $(window).resize(checkheight); | ||
+ | }); | ||
+ | |||
+ | $(function(){ | ||
+ | $(".hidelogo").hover( | ||
+ | function(){ | ||
+ | $(".hidelogo img").stop().animate({'margin-top':'14px','margin-bottom':'-10px'},400,'swing'); | ||
+ | }, | ||
+ | function(){ | ||
+ | $(".hidelogo img").stop().animate({'margin-top':'-40px','margin-bottom':'-65px'},300,'swing'); | ||
+ | } | ||
+ | ); | ||
}); | }); | ||
</script> | </script> |
Latest revision as of 20:06, 21 September 2014