0

我在让 fancybox-rails 在我的应用程序中工作时遇到问题。

我的观点

= link_to "http://www.youtube.com/embed/lGOkgbdGqKs", class: "fancybox fancybox.iframe { width:850, height:556 }"

咖啡脚本

(document).ready ->
  $(".fancybox").fancybox()

应用程序.css.sass

/*
 *= require_self
 *= require fancybox
 *= require_tree .
 */

该链接可用,但我单击它时无法使其弹出。不知道为什么这不起作用。

4

1 回答 1

0

I was able to figure out the problem. I was not giving an image or verbiage for my fancybox link. I was just inserting the URL and expecting it to figure out the name of the link.

I changed my link to:

= link_to "Video", "http://www.youtube.com/embed/lGOkgbdGqKs", class: "fancybox fancybox.iframe { width:850, height:556 }"

and it worked as expected

于 2013-02-26T17:45:58.290 回答