2009-06-30 61 views
0

我正在使用rails來構建我的應用程序,並且我想要一個thickbox單擊某個特定鏈接。
我在頁面的一個分區中顯示的部分中使用以下代碼,然後單擊user.name,i需要的ThickBox ..當我使用下面的代碼,沒有任何反應..
<%= link_to_function user.name,remote_function(:update=>"result", :url => {:action => :resultsuser}, :with => "'id='+#{user.id}+'&height=400&width=600'") %>
我已經包括
<%= javascript_include_tag 'jquery' %>
<%= javascript_include_tag 'thickbox' %>
jQuery.noConflict()
<%= stylesheet_link_tag("thickbox") %>
也全部換成$的jQuery在thickbox.js文件..沒有任何反應..
請幫助我。在rails中使用thickbox3.1的問題..!

+0

當您單擊用戶名時,您是否看到Firebug控制檯中的任何錯誤? – msingleton 2009-06-30 05:10:07

回答

0

你把

jQuery.noConflict(); 

成scripttag?

0

嘗試在link_to_function輔助方法中添加class選項。

<%= link_to_function user.name,remote_function(:update=>"result", :url => {:action => :resultsuser}, :with => "'id='+#{user.id}+'&height=400&width=600'", :class => "thickbox") %>