1

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?

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.