[jQuery Roundaboutライブラリ] 項目を回転させる

説明

Roundaboutライブラリで項目を回転させるには$()を使ってリスト項目を指定した後でroundabout()メソッドを呼び出します。また、回転させるリスト項目用に.roundabout-holder、.roundabout-moveable-item、.roundabout-in-focusの三種類のスタイルシートクラスを作成し定義しておく必要があります。

サンプルプログラム

【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/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.roundabout-1.0.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>奥行きのある回転</h1>
<ul id="rotateBlock">
<li>項目1</li>
<li>項目2</li>
<li>項目3</li>
<li>項目4</li>
<li>項目5</li>
<li>項目6</li>
<li>項目7</li>
<li>項目8</li>
</ul>
</body>
</html>

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