Reputation: 6389
I have a select list that is created on a .click
event. It looks like this:
$('<select class="selectStatus" onChange="statusSubmit()"/>')
.attr('name', 'status')
.append('<option>Pick one</option>', '<option>Open</option>', '<option>Full</option>', '<option>Canceled</option>')
.appendTo(this);
In my main styles.css
file I added this:
select .selectStatus {
width:700px;
padding:0px;
background-color: green;
}
Shouldn't the css be applied to this select list once it's created?
Upvotes: 1
Views: 56
Reputation: 324640
You are applying those styles to children of select
s with class="selectStatus"
.
Remove the space: select.selectStatus
.
Upvotes: 8