먼저 코드를 살펴보세요.
<스크립트>
$(문서).ready(함수(){
$("버튼").click(function(){
var div=$(".box");
div.animate({height:'200px',opacity:'0.4'},"slow");
div.animate({너비:'200px',불투명도:'0.8'},"느림");
div.animate({height:'100px',opacity:'0.4'},"slow");
div.animate({너비:'100px',불투명도:'0.8'},"느림");
div.animate({right:'100px',opacity:'0.8'},"slow");
div.animate({bottom:'100px',opacity:'0.8'},"느림");
div.animate({왼쪽:'100px',불투명도:'0.8'},"느림");
div.animate({top:'100px',opacity:'0.8'},"slow");
});
});
스크립트>
$(문서).ready(함수(){
$("버튼").click(function(){
var div=$(".box");
div.animate({height:'300px',opacity:'0.4'},"slow");
div.animate({너비:'300px',불투명도:'0.8'},"느림");
div.animate({height:'100px',opacity:'0.4'},"slow");
div.animate({너비:'100px',불투명도:'0.8'},"느림");
});
});
});
본문>