javascript - Modify Select2 search box -


i using ajax feature of select2 control load options asynchronously. however, change default template of search box have placeholder , icon on right.

is there proper way that?

enter image description here

placeholder: example:

$(".js-example-placeholder-single").select2({   placeholder: "select state",   allowclear: true }); 

custom icon:

you can append using js. create dom element, append want , style css. of course can add additional functionality if needed.

http://www.w3schools.com/jsref/met_node_appendchild.asp


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -