花式盒子使图像消失在轨道上 [英] Fancy box making image disappear on rails
本文介绍了花式盒子使图像消失在轨道上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我单击图像时,我的精美框图像不断消失,精美框显示该图像,但是一旦关闭,它们的图像就消失了.我要去哪里错了?
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:
Fancybox javascript:
$(document).ready(function() {
$(".single_image").fancybox();
});
Fancybox图片:
Fancybox Image:
<%= link_to(image_tag"blindlogo.jpg", :class=>"single_image") %>
推荐答案
已更新
尝试在您的link_to代码下方添加以下代码,如下所示:
Try to add following codes below your link_to codes, so it looks like:
<%= link_to "#", "assets/blindlogo.jpg", :class=>"single_image" %>
请参见 http://fancybox.net/howto .该页面说您在链接元素中需要href.
See http://fancybox.net/howto. This page says you need href in your link element.
这篇关于花式盒子使图像消失在轨道上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文