設置サンプルのソース
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Photo Slider | 設置サンプル</title>
<link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/content/lib/photoslider/photoslider.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" ></script>
<script type="text/javascript" src="/content/lib/photoslider/photoslider.js"></script>
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
<body class="black">
<div id="wrap">
<h1><a href="http://opiefoto.com/articles/photoslider">Photo Slider</a> | 設置サンプル</h1>
<div id="content">
<div class="photoslider" id="default"></div>
<script type="text/javascript">
$(function(){
//change the 'baseURL' to reflect the host and or path to your images
FOTO.Slider.loadingURL = 'loading.gif',
FOTO.Slider.baseURL = '/content/lib/galleryimages/',
FOTO.Slider.thumbURL = 'christmas-party-{ID}t.jpg',
FOTO.Slider.mainURL = 'christmas-party-{ID}.jpg',
//set images by filling our bucket directly
FOTO.Slider.bucket = {
'default': {
0: {'thumb': '1t.jpg', 'main': '1.jpg', 'caption': 'Christmas Party no.1'},
1: {'thumb': '2t.jpg', 'main': '2.jpg'},
2: {'thumb': '3t.jpg', 'main': '3.jpg', 'caption': 'Christmas Party no.3'},
3: {'thumb': '4t.jpg', 'main': '4.jpg', 'caption': 'Christmas Party no.4'},
4: {'thumb': '5t.jpg', 'main': '5.jpg', 'caption': 'Christmas Party no.5'},
5: {'thumb': '6t.jpg', 'main': '6.jpg', 'caption': 'Christmas Party no.6'},
6: {'thumb': '7t.jpg', 'main': '7.jpg', 'caption': 'Christmas Party no.7'},
7: {'thumb': '8t.jpg', 'main': '8.jpg', 'caption': 'Christmas Party no.8'},
8: {'thumb': '9t.jpg', 'main': '9.jpg', 'caption': 'Christmas Party no.9'}
}
};
//or set our images by the bucket importer
var ids = new Array(1,2,3,4,5,6,7,8,9);
FOTO.Slider.importBucketFromIds('default',ids);
FOTO.Slider.reload('default');
FOTO.Slider.preloadImages('default');
FOTO.Slider.enableSlideshow('default');
});
</script>
<p>写真素材:<a href="http://www.nwyhstockimages.com/">NWYH Stock Image Library</a></p>
</div><!-- div#wrap/div#content -->
</div><!-- div#wrap -->
</body>
</html>