Team:SYSU-China/Team/Member style.js
From 2013.igem.org
(19 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
$("div.flash_button").mouseenter(function(){ | $("div.flash_button").mouseenter(function(){ | ||
- | $("div.inner_frame").stop(); | + | $(this).parent().children("div.inner_frame").stop(); |
- | $( | + | $(this).stop(); |
- | $("div.inner_frame").animate({width: | + | $(this).parent().children("div.inner_frame").animate({width: 480},200,function(){ |
- | $("div.flash_button").css({"background":"url(https://static.igem.org/mediawiki/2013/3/39/Stein_00.png) no-repeat 90% | + | $(this).parent().children("div.flash_button").css({"background":"url(https://static.igem.org/mediawiki/2013/3/39/Stein_00.png) no-repeat 90% 25%"}); |
- | $("div.flash_button").animate({left:'+=3px'},10); | + | $(this).parent().children("div.flash_button").animate({left:'+=3px'},10); |
- | $("div.flash_button").animate({left:'-=3px'},10); | + | $(this).parent().children("div.flash_button").animate({left:'-=3px'},10); |
- | $("div.flash_button").animate({top:'+=3px'},10); | + | $(this).parent().children("div.flash_button").animate({top:'+=3px'},10); |
- | $("div.flash_button").animate({top:'-=3px'},10); | + | $(this).parent().children("div.flash_button").animate({top:'-=3px'},10); |
}); | }); | ||
}); | }); | ||
$("div.flash_button").mouseout(function(){ | $("div.flash_button").mouseout(function(){ | ||
- | $("div.inner_frame").stop(); | + | $(this).parent().children("div.inner_frame").stop(); |
- | $( | + | $(this).stop(); |
- | + | $(this).animate({left:'+=3px'},10); | |
- | + | $(this).animate({left:'-=3px'},10); | |
+ | $(this).animate({top:'+=3px'},10); | ||
+ | $(this).animate({top:'-=3px'},10,function(){ | ||
+ | $(this).css({"background":"none"}); | ||
+ | $(this).parent().children("div.inner_frame").animate({width: 0},200); | ||
+ | }); | ||
}); | }); | ||
}); | }); |
Latest revision as of 15:18, 26 September 2013
$(document).ready(function(){
$("div.flash_button").mouseenter(function(){ $(this).parent().children("div.inner_frame").stop(); $(this).stop(); $(this).parent().children("div.inner_frame").animate({width: 480},200,function(){ $(this).parent().children("div.flash_button").css({"background":"url() no-repeat 90% 25%"}); $(this).parent().children("div.flash_button").animate({left:'+=3px'},10); $(this).parent().children("div.flash_button").animate({left:'-=3px'},10); $(this).parent().children("div.flash_button").animate({top:'+=3px'},10); $(this).parent().children("div.flash_button").animate({top:'-=3px'},10); }); }); $("div.flash_button").mouseout(function(){ $(this).parent().children("div.inner_frame").stop(); $(this).stop(); $(this).animate({left:'+=3px'},10); $(this).animate({left:'-=3px'},10); $(this).animate({top:'+=3px'},10); $(this).animate({top:'-=3px'},10,function(){ $(this).css({"background":"none"}); $(this).parent().children("div.inner_frame").animate({width: 0},200); }); }); });