I’m trying to use fancybox so that my pics can be viewed nicely. I have the same issue as Fancy box making image disappear on rails, but even after adding the href to my link it does not work.
The issue is when I click on the pic, the fancybox image viewer pops up, but the image on my site disappears.
Here’s the part of my code that doesn’t work:
<% if @album.photos.any? %>
<% @album.photos.each do |photo| %>
<div class="picthumb">
<%= link_to image_tag(photo.avatar.url(:small), :class => "fancybox"), "#" %>
</div>
<% end %>
<% else %>
There are no pics in this album
<% end %>
Anyone know what’s going on?
So I eventually figured it out. It’s cuz I was using fancybox on the image as opposed to the link.
that’s the new html.