Javascriptをはじめ、Ajax、jQueryの著書多数のガイドが、何かと最近騒がれているJa…
北欧好きが、愛用の北欧モノを見せ合うコミュニティ

<style>
#test1{
height : 200px;
}
.divs{
height : 30px;
width : 30px;
position: relative;
left : 0px;
top : 0px;
}
</style>
<div id="test1">
<button id="btn1">Start</button>
<button id="btn2">Stop</button>
<div id="su1" class="divs"
style="background:#a4c3ff"> </div>
</div>
<script type="text/javascript">
jQuery(function($){
function runIt() {
$("#su1")
.animate({left :0, top : 0},1)
.animate({left : 200 },1000)
.animate({top : 100 },1000)
.animate({opacity : 0.2 },1000)
.animate({left : 0 },500)
.animate({top : 0 },500)
.animate({opacity : 1 },2000)
}
$("#btn1")
.click(function () {
runIt()
})
$("#btn2")
.click(function () {
$("#su1").stop( true,true )
})
});
</script>
人気Javascriptランキング
Powered by 価格.com
北欧好きが、愛用の北欧モノを見せ合うコミュニティ