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