Template:Team:KIT-Kyoto/hidelogo

From 2014.igem.org

(Difference between revisions)
 
(49 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').addClass('hide_logo');
+
$(".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(){
$(function(){
-
$(".toplogo img").click(function(){
+
$(".hidelogo").hover(
-
var hide = $("div").hasClass("hide_logo");
+
function(){
-
var active = $("div").hasClass("clicked");
+
$(".hidelogo img").stop().animate({'margin-top':'14px','margin-bottom':'-10px'},400,'swing');
-
if(hide){
+
},
-
$(".toplogo img").stop().animate({'margin-top':'0px','margin-bottom':'0px'},1000,'linear').addClass('clicked');
+
function(){
-
}else if(active){
+
$(".hidelogo img").stop().animate({'margin-top':'-40px','margin-bottom':'-65px'},300,'swing');
-
$(".toplogo img").stop().animate({'margin-top':'-40px','margin-bottom':'-65px'}).removeClass('clicked');
+
}
}
 +
);
});
});
-
 
</script>
</script>

Latest revision as of 20:06, 21 September 2014