Please somebody help me on this, really appreciate any help I can get
HTML
<a id="fancybox" href="javascript:;">Gallery 1</a>
<br />
<a id="fancybox" href="javascript:;">Gallery 2</a>
<br />
<a id="fancybox" href="javascript:;">Gallery 3</a>
JS
$(document).ready(function() {
$("#fancybox").click(function() {
$.fancybox.open([
{
href : 'http://fancyapps.com/fancybox/demo/1_b.jpg',
title : 'My title'
}, {
href : 'http://fancyapps.com/fancybox/demo/2_b.jpg',
title : '2nd title'
}, {
href : 'http://fancyapps.com/fancybox/demo/3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});
});
as you can see only the first link is working, but I wish that in every link has a different set of images
for example ( this is what I need to achieve )
<a id="fancybox" href="javascript:;">Gallery 1</a>
<div>
<img src="1.jpg">
<img src="2.jpg">
<img src="3.jpg">
<img src="4.jpg">
</div>
<br />
<a id="fancybox" href="javascript:;">Gallery 2</a>
<div>
<img src="5.jpg">
<img src="6.jpg">
<img src="7.jpg">
<img src="8.jpg">
</div>
<br />
<a id="fancybox" href="javascript:;">Gallery 3</a>
<div>
<img src="9.jpg">
<img src="10.jpg">
<img src="11.jpg">
<img src="12.jpg">
</div>
Thanks and I have here a fiddle