我嘗試實施JQuery的燈箱插件,動態圖像(圖像彈出式分組)的分組,但我找不到彈出分組的圖像線索。HOWTO使用變量屬性的jQuery燈箱插件
誰能告訴我什麼,我做錯了什麼?
HTML
<a href="pic1.jpg" class="pic" rel="lightbox1"><img src="pic1.jpg"/></a>
<a href="pic2.jpg" class="pic" rel="lightbox1"><img src="pic2.jpg"/></a>
<a href="pic3.jpg" class="pic" rel="lightbox2"><img src="pic3.jpg"/></a>
<a href="pic4.jpg" class="pic" rel="lightbox2"><img src="pic4.jpg"/></a>
<a href="pic5.jpg" class="pic" rel="lightbox3"><img src="pic5.jpg"/></a>
<a href="pic6.jpg" class="pic" rel="lightbox3"><img src="pic6.jpg"/></a>
JQUERY
jQuery(document).ready(function() {
$('a.pic').live('click', function() {
var relvalue = $(this).attr('rel');
$("a[rel="+relvalue+"]").lightBox();
});
});
謝謝!
您使用哪個lightbox插件? – czarchaic 2010-01-19 01:48:42
我使用jQuery燈箱插件0.5萊昂德羅·維埃拉 http://leandrovieira.com/projects/jquery/lightbox/ – 2010-01-19 11:46:42