I am using FancyBox to show some images. I have to pass the image ID to the base URL to get the image so in both 'anchor' tag and 'img' tag, I am using the same URL to get the image.
This is my HTML code:
<a ng-repeat="id in voilation.PhotoIds" class="voilations-image-list fancybox" rel="gallery1" href="baseURL/{{id}}"><img ng-src="baseURL/{{id}}" class="img-thumbnail" /></a>
The JS:
$(".fancybox").fancybox({
openEffect: 'none',
closeEffect: 'none'
});
I am retrieving the ID through Angular Js and Merging it in the baseURL. But the fancybox doesn't work and the image opens in new tab.
Thanks