javascript - Dojo Combobox using class attribute -


i trying implement dojo combobox. works fine "id" attribute in ". wondering anyway can implement using "class" attribute. have tried not working me. great if can me this.

here code in <div id="stateselect"> http://jsfiddle.net/rs2z5/234/

thanks

use dojo/query module select elements class. iterate on nodes class. this

require(['dojo/query', 'dojo/data/item...'.....],   function(query, itemfile......){        query(".myselect").foreach(function (node) {         var combobox = new combobox({             name: "stateselect",             value: "select",             store: store,         }, node);     }); }); 

here demo http://jsfiddle.net/dhirajbodicherla/rs2z5/237/


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -