I have a control bar on my application that has popovers with dynamically loaded partial views (using #{j render :partial =>'layouts/popover_partial'} ). I want to use a jQuery script to auto grow a textbox but can't seem to get it to work. How can I make sure that the jQuery autogrow script is included with my dynamically loaded view?
Add a comment
|
1 Answer
JavaScript for a specific View (let's say View = bamboo), will be stored in,
/app/assests/javascripts/bamboo.js.coffee
Notice you will want to translate your JQuery JavaScript into CoffeeScript format. See the coffee script site for how to do that.
If you want the JavaScript to be call-able for any view, put it in,
/app/assests/javascripts/application.js