ruby on rails - Issues with jQuery UI autocomplete when form added with Javascript -


I can not seem to complete the work with the form that I'm adding to the screen with javascript . For example, I'm using my new route to present my object form in my new Rail file I have the following within Js.erb:

  $ ("div # container"). Hide (). Html ("& lt;% = escape_javascript render 'form' & gt% ;.); fadein ();   

Once sung, if I type in my input element:

    

And listen with javascript:

  jQuery -> As a completely related question, I can not get anything. ('Input # ItemName'). Autocomplete source: ['Test', 'Testing', 'Test 234']   

If I copy and paste this form and place it on the screen on load (and my Do not connect dynamically with the new railway route) then it will work fine. How can I get myself to listen to things dynamically added?

This will automatically show your complete script with your #object_name form element First being added - if you make sure that you have added #object_name to your document, you can redefine your complete script.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -