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

Revision as of 17:05, 20 September 2014