drop down menu - Create a multiple dropdown with jquery -


We can dynamically create a dropdown using jquery in the following functions

  Var color = $ ('& lt; select / & gt;', {'class': 'relation-select', 'id': 'color_' + j, 'name': 'color []'});  

I want to leave this HTML and make a drop down:

  & lt; choose name; "Collection_id []" id = "collection_id" multiple data-rel = "selected" & gt; & Lt; / Select & gt;  

How can I do this?

bus:

  $ ('& lt; select / Gt; ',' 'id': 'collection_id', 'multiple': true, 'name': 'collection_id []'}))). Attr ('data-ral', 'selected');  

.

Result (as appearing in the demo console):

   

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -