I am using the jQuery fancybox plugin to create an image gallery. User clicks on an image and then a modal shows up to navigate through all the images. Up to this point, everything is done with the following code .
But the change I want to do is in the modal slide show. The slideshow needs to show the particular image that was clicked on plus other images which are not in the gallery plus extra div
s. Those extra images and divs
may stay anywhere in the code.
HTML:
<a class="fancybox" href="img/a_small.jpg" data-fancybox-group="gallery" title="Project">
<img src="img/a_big.jpg" alt="image project"/>
</a>
<a class="fancybox" href="img/b_small.jpg" data-fancybox-group="gallery" title="Project">
<img src="img/b_big.jpg" alt="image project"/>
</a>
<a class="fancybox" href="img/c_small.jpg" data-fancybox-group="gallery" title="Project">
<img src="img/c_big.jpg" alt="image project"/>
</a>
JS:
$('.fancybox').fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
'autoSize': false,
'autoWidth' : 600,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'swf',
'autoCenter ' :true,
'aspectRatio':true
});
1) How to achieve that ?
2) If fancybox is not a good fit, is there any other script that will help to achieve the purpose in a responsive design way ?
EDIT: An online demo is here.