Template:Team:KIT-Kyoto/hidelogo

From 2014.igem.org

(Difference between revisions)
 
(31 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
$(function(){
+
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(){
-
$(".toplogo img").animate({'margin-top':'-40px','margin-bottom':'-65px'},1000,'linear');
+
$(".hidelogo img").animate({'margin-top':'-40px','margin-bottom':'-65px'},800,'linear');
-
$(this).addClass('hidelogo');
+
},3000);
},3000);
 +
 +
setTimeout(function(){
 +
$(".showlogo img").animate({'margin-top':'14px','margin-bottom':'-10px'},800,'linear');
 +
},1000);
 +
};
 +
 +
$(function(){
 +
    checkheight();
 +
    $(window).resize(checkheight);
});
});
 +
$(function(){
$(function(){
-
$(".toplogo").hover(
+
$(".hidelogo").hover(
function(){
function(){
-
if($("div").is('.hidelogo')){$(".toplogo img").stop().animate({'margin-top':'0px','margin-bottom':'0px'},800,'linear');
+
$(".hidelogo img").stop().animate({'margin-top':'14px','margin-bottom':'-10px'},400,'swing');
-
}},
+
},
function(){
function(){
-
$(this).stop().animate({'margin-top':'-40px','margin-bottom':'-65px'},800,linear);
+
$(".hidelogo img").stop().animate({'margin-top':'-40px','margin-bottom':'-65px'},300,'swing');
}
}
);
);
-
 
});
});
</script>
</script>

Latest revision as of 20:06, 21 September 2014