[amazon style image and title scrollerライブラリ] アマゾンライクな回転式画像を表示する

説明

amazon style image and title scrollerライブラリでアマゾンライクな回転式画像を表示するには、サンプルのように決められた形式でHTMLタグを記述します。amazon_scroller()メソッドのオプションパラメータのscroller_images_widthに画像の横幅、scroller_images_heightに画像の縦幅を指定します。表示する画像の最大枚数はscroller_show_countに指定します。

サンプルプログラム

【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">
<link rel="stylesheet" href="css/amazon_scroller.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/amazon_scroller.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>Amazon style image and title scrollerサンプル</h1>
<div id="amazon_scroller" class="amazon_scroller">
<div class="amazon_scroller_mask">
<ul>
<li><a href="#" title="松本城"><img src="images/1.jpg" width="200" height="113" alt=""/></a></li>
<li><a href="#" title="浅間山"><img src="images/2.jpg" width="200" height="113" alt=""/></a></li>
<li><a href="#" title="高ボッチ高原"><img src="images/3.jpg" width="200" height="113" alt=""/></a></li>
<li><a href="#" title="蛙"><img src="images/4.jpg" width="200" height="113" alt=""/></a></li>
<li><a href="#" title="アヤメ"><img src="images/5.jpg" width="200" height="113" alt=""/></a></li>
</ul>
</div>
<ul class="amazon_scroller_nav">
<li></li>
<li></li>
</ul>
<div style="clear: both"></div>
</div>
</body>
</html>


【sample.js】
$(function() {
$("#amazon_scroller").amazon_scroller({
scroller_images_width : 200,
scroller_images_height: 113,
scroller_show_count: '2'
});
});
サンプルを実行
[戻る]