javascript - Styling 2 different classes of jQuery UI selectmenus -


i'd have 2 different styles (classes) select menus on site. don't want use ids since there can numerous drop downs on same page.

so example:

<div class="row">   <select class="style1">       <option>option 1</option>       <option>option 2</option>       <option>option 3</option>   </select>    <select class="style1">       <option>option 1</option>       <option>option 2</option>       <option>option 3</option>   </select>    <select class="style2">       <option>option 1</option>       <option>option 2</option>       <option>option 3</option>   </select> </div> 

however, when create selectmenus javascript call:

$("select").selectmenu(); 

it doesn't transfer class name selectmenu creates (it creates id based on original 1 plus "-button").

is there way of using classes style jquery ui selectmenu?

thanks.

since new select created jquery ui follows original select in markup, able find solution using adjacent sibling selector (+).

in css:

select.style1 + .ui-selectmenu-button{} select.style2 + .ui-selectmenu-button{} 

if has alternative solution, feel free share, thanks!


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -