Have any one tried to activate fancybox thumbnail gallery using a button or an anchor click, Currently one can use fancybox by clicking on the image which takes you to the popup image gallery, In my condition i want a simple button or an html anchor , so that when a user click on the button or anchor the modal popup gallery should be displayed. Also my images will be coming from db , Any ideas how to do this ???
Code from fancybox website which runs when clicking on an image
$('.fancybox-thumbs').fancybox({
prevEffect: 'none',
nextEffect: 'none',
closeBtn: false,
arrows: false,
nextClick: true,
helpers: {
thumbs: {
width: 50,
height: 50
}
}
});
Updated Working script:
$('a.gallery').click(function () {
$('.fancybox-thumb').click();
});
I was thinking about this (since your earlier question) and maybe you could try simulating a click in the first element classed .fancybox-thumbs
Let me know