I have two selectmenus. I want to change the look and feel of one of them. This is what I tried so far: Add two selects then within the style tag, i tried to change the class ui-selectmenu-button and ui-selectmenu-text for only select1 but no luck.
// JS
<script>
$("#select1").selectmenu();
$("#select2").selectmenu();
</script>
// HTML
<select id="select1">
<option value="1"> 1 </option>
</select>
<select id="select2">
<option value="2"> 2 </option>
</select>
// CSS
<style>
#select1 .ui-selectmenu-button{
background: rgb(12,27,37);
}
#select1 .ui-selectmenu-text{
color: white;
}
</style>
If i simply do the thing below, it will work but change all the jquery ui selectmenus and i only want it to work for select1 in this example.
<style>
.ui-selectmenu-button{
background: rgb(12,27,37);
}
</style>
<select>. It will hide the select and add it's generated HTML after it. Therefore the adjacent connector should be used. See my answer below.