Help interpreting a simple jQuery-related instruction
Hi, I'm new to jQuery and relatively new to Ruby on Rails. I've successfully installed the rails3-jquery-autocomplete gem (
http://github.com/crowdint/rails3-jquery-autocomplete) and I'm playing around with it in a test Rails project.
One of the instructions on the gem states:
Getting the object id
If you need to use the id of the selected object, you can use the :id_element HTML tag too:
f.autocomplete_field :brand_name, autocomplete_brand_name_products_path, :id_element => '#some_element'
This will update the field with id *#some_element with the id of the selected object. The value for this option can be any jQuery selector.
That seems simple enough. My question related to jQuery is -- what does the last sentence mean? Can I just have a <div id="some_element"> on the page? Or do I need to write some jQuery code in order to make it a jQuery selector?
Thanks for the help with this simple question.