Template:Team:KIT-Kyoto/hidelogo

From 2014.igem.org

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

Latest revision as of 20:06, 21 September 2014