0
votes

Hi my fancy box image keeps disappearing whenever I click on the image,the fancy box displays the image but once I close it theirs no image. Where am I going wrong?

Fancybox javascript:

$(document).ready(function() {
    $(".single_image").fancybox();
});

Fancybox Image:

<%= link_to(image_tag"blindlogo.jpg", :class=>"single_image") %>
1

1 Answers

1
votes

Updated

Try to add following codes below your link_to codes, so it looks like:

<%= link_to "#", "assets/blindlogo.jpg", :class=>"single_image" %>

See http://fancybox.net/howto. This page says you need href in your link element.