views:

81

answers:

2

I am using rails to build my application and I want a thickbox on clicking a particular link..
I use the below code in my partial which is displayed in a division of a page and on clicking the user.name, i need the thickbox.. when i use the below code, nothing happens..
<%= link_to_function user.name,remote_function(:update=>"result", :url => {:action => :resultsuser}, :with => "'id='+#{user.id}+'&height=400&width=600'") %>
i have included the
<%= javascript_include_tag 'jquery' %>
<%= javascript_include_tag 'thickbox' %>
jQuery.noConflict()
<%= stylesheet_link_tag("thickbox") %>
and also replaced all $ by jQuery in the thickbox.js file.. nothing happens..
please help me out.

A: 

Did you put the

jQuery.noConflict();

into a scripttag?

Lichtamberg
A: 

Try adding the class option in the link_to_function helper method.

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

punit