[jQuery Gallery Sliderライブラリ] 表示されるスライド画像の横幅を指定する

説明

jQuery Gallery Sliderライブラリで表示されるスライド画像の横幅を指定するにはgalleryslider()メソッドのオプションパラメータwidthにピクセル数を指定します。

サンプルプログラム

【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/galleryslider.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.galleryslider.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
</head>
<body>
<h1>縦長スライド</h1>
<div id="gallery">
<img src="photo/1.jpg">
<img src="photo/2.jpg">
<img src="photo/3.jpg">
<img src="photo/4.jpg">
<img src="photo/5.jpg">
<img src="photo/6.jpg">
</div>
</body>
</html>


【sample.js】
$(function(){
$("#gallery").galleryslider({ width: 600 });
})
サンプルを実行
[戻る]