TAG
CSS
JavaScript
Result
Run
License
<button type="button" id="btn">Click</button> <div id="target"></div>
#target { width: 100px; height: 100px; background: red; text-align: center; line-height: 100px; left: 0; top: 0; position: relative; }
$(function() { $("#btn").click(function() { $("#target").animate({ /* 절대값으로 지정 */ borderRadius : "50px", /* 상대값으로 지정되어 호출될 때마다 200px씩 이동한다.*/ left : "+=200", /* toggle로 지정되면 호출시 원래의 가로크기와 0값이 번갈아 처리된다. */ width: ["toggle", "linear"], height : "toggle" }, 1000, function() { $(this).text("OK"); }); }); });
Console
expand_less
License
License
by DevDic
Close