Calling a jQuery function from RJS/onclick


I have the following jQuery function on the head of my page.

On page load, this gets called correctly.

Now there’s a link on the page that lets me add more rows and i do
this via RJS. Here’s the code.

<%= add_item_link "+" %>

def add_item_link(name)
link_to_function name do |page|
page.insert_html :before, :empty_item, :partial=>‘item’, :object

Now this partial ‘item’ contains form elements upon which jNice needs
to work its magic.

How can I call the jNice function after the user clicks on the

anyone?? anything?

enter live(). implementing this function solved my problem.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs