是的,我已經包括了他們:
<%= stylesheet_link_tag "application", "jquery-ui", "map", "facebox", "faceplant" %>
<%= javascript_include_tag 'jquery', 'jquery.validate', 'facebox', 'application' %>
和application.js中
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loading_image : 'loading.gif',
close_image : 'closelabel.gif'
})
})
當我點擊:
facebox_link_to "test", :url => '/test/new'
這是和Firebug的控制檯報告:
$("a[rel*=facebox]").facebox is not a function
anonymous(function()) applicat...262613317 (line 4)
anonymous() jquery.j...260464452 (line 19)
anonymous([function(), function(), function(), 2 more...], function(), Object name=F) jquery.j...260464452 (line 12)
anonymous() jquery.j...260464452 (line 19)
anonymous() jquery.j...260464452 (line 19)
[Break on this error] close_image : 'closelabel.gif'\n applicat...262613317 (line 4)
有沒有運氣?得到同樣的問題...有一些運氣黑客它,但造型錯了 – Angela 2010-01-07 15:55:02