Displaying 1 result from an estimated 1 matches for "add_item_link".
2009 Aug 07
2
calling a jQuery function from RJS/onclick
....jNice'').jNice();
});
.....
</script>
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.
<tr id="empty_item">
<div id="plussign"><%= add_item_link "+" %></div>
</tr>
def add_item_link(name)
link_to_function name do |page|
page.insert_html :before, :empty_item, :partial=>''item'', :object
=> Item.new
end
end
Now this partial ''item'' contains form elements upon which j...