<select id="select">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<span id="red">red </span> <span id="default">default</span>
$("#red").click(function(){
$("#select").css('background-color', 'red');
});
$("#default").click(function(){
$("#select").css('background-color', 'white');
});
if i click RED then select is red. how can i set default style for select, against white?
Just remove the property to reset the background color to its default:
For reference, see the jQuery
.css()docs. Quote: