[jquery] animate 기능 움직이다가 멈추기 alert (복습)
box $(function(){ var div1 = $('#div1'); var img = $(""); div1.animate({top: 200, left: 400 }, 1000); div1.animate({top: 0, left: 400 }, 1000, function(){alert("쉬어가세요");}); div1.animate({top: 200, left: 0 }, 1000); div1.animate({top: 0, left: 0 }, 1000); img.appendTo(div1); }); 변수를 만들어줘서 간단하게 불러서 쓸수도 있다. $(function(){ var img = $(""); $('#div1').animate({top: 200, left: 400 }, 1000, function(){ ..