Team:University College London/js/frontslide

From 2012.igem.org

(Difference between revisions)
Line 1: Line 1:
$(document).ready(function(){
$(document).ready(function(){
-
       $('label1').hover(function(){
+
       $('#label1').hover(function(){
-
    alert('hi');
+
             if($('#pin1').hasClass('animating') == false){
-
             if($('pin1').hasClass('animating') == false){
+
                   $('#pin1').addClass('animating').animate({top:'-=15px'},300,function(){this.animate({top:'+=15px'},300);});
-
                   $('pin1').addClass('animating').animate({top:'-=15px'},300,function(){this.animate({top:'+=15px'},300);});
+
                   }
                   }
             });
             });
});
});

Revision as of 21:48, 31 July 2012

$(document).ready(function(){

     $('#label1').hover(function(){
            if($('#pin1').hasClass('animating') == false){
                  $('#pin1').addClass('animating').animate({top:'-=15px'},300,function(){this.animate({top:'+=15px'},300);});
                  }
            });

});