Template:Team:KIT-Kyoto/hidelogo

From 2014.igem.org

(Difference between revisions)
Line 3: Line 3:
$(function(){
$(function(){
setTimeout(function(){
setTimeout(function(){
-
$(".toplogo img").animate({'margin-top':'-40px','margin-bottom':'-65px'},1000,'linear').addClass('hide_logo');
+
$(".toplogo img").animate({'margin-top':'-40px','margin-bottom':'-65px'},1000,'linear');
 +
$(this).addClass('hide_logo');
},3000);
},3000);
});
});
Line 11: Line 12:
var active = $("div").hasClass("clicked");
var active = $("div").hasClass("clicked");
if(hide){
if(hide){
-
$(".toplogo img").stop().animate({'margin-top':'0px','margin-bottom':'0px'},1000,'linear').addClass('clicked');
+
$(".toplogo img").stop().animate({'margin-top':'0px','margin-bottom':'0px'},1000,'linear');
 +
$(this).addClass('clicked');
}else if(active){
}else if(active){
-
$(".toplogo img").stop().animate({'margin-top':'-40px','margin-bottom':'-65px'}).removeClass('clicked');
+
$(this).stop().animate({'margin-top':'-40px','margin-bottom':'-65px'});
 +
$(this).removeClass('clicked');
}
}
});
});
</script>
</script>

Revision as of 17:09, 20 September 2014