[Roundaboutライブラリ] 移動時間を指定する

説明

Roundaboutライブラリで移動時間を指定するにはroundabout()メソッドのオプションパラメータdurationにミリ秒を指定します。

サンプルプログラム

【HTML】
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="css/roundabout.css" type="text/css" media="all">
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.roundabout-shapes-1.1.js"></script>
<script type="text/javascript" src="js/jquery.roundabout-1.0.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>Roundaboutサンプル</h1>
<ul id="myData">
<li>1:頭</li>
<li>2:首</li>
<li>3:胴体</li>
<li>4:手</li>
<li>5:足</li>
</ul>
</body>
</html>

【sample.js】
$(function(){
$("#myData").roundabout({
duration : 3000
});
});
サンプルを実行
[戻る]