search for: addpollopt

Displaying 1 result from an estimated 1 matches for "addpollopt".

2009 Jun 03
3
Appending a Rails Partial with jQuery
...currently have it working in my app. What i really would like is to keep all my code in my application.js file vs a bunch of files all over my view folders. This is what i have in my application.js $(document).ready(function() { $(''#add_option'').click(function() { $(this).addPollOption(); }); }); jQuery.fn.addPollOption = function() { $("#poll_options").append(''#{escape_javascript render(:partial => "topics/poll_option", :object => TopicOption.new)}''); }; i have tried it with the #{} and the <%= %> both give the same resu...