jQueryでLightBoxを実現するjavascript「jQuery Lightbox Plugin (balupton edition)」
LightBoxをjQueryで実現するJavaScriptは以前jQueryでLightBoxを実現するjavascript「jQuery lightBox plugin」で紹介しましたが、今回紹介する方が高機能で柔軟性があるかもしれません。
jQuery Lightbox Plugin (balupton edition)です。
使用方法
jQuery Lightbox Plugin (balupton edition)からjquery.lightbox.jsとjquery.lightbox.packed.cssを、jQueryからjquery.jsをダウンロードします。
次にhead内に以下を加えます。
<script type="text/javascript" src="http://yourdomain/jquery.js"></script>
<script type="text/javascript" src="http://yourdomain/jquery.lightbox.js"></script>
<link type="text/css" rel="stylesheet" href="http://yourdomain/jquery.lightbox.packed.css">
あとは画像をいつものLightBoxのように記述します。
<a href="画像パス" title="タイトル" rel="lightbox[]">
<img src="画像サムネイル">
</a>
その他、js内で調整可能です。
※jquery.lightbox.jsの460行目あたり。
サンプル
Javascriptサンプルページ一覧
skuare.net