Reputation: 505
I was using the Add class method
$("select[name='" + ABC+ i + "']").addClass('addBorder');
This was working in Chrome , FF , safari but not on IE So changed it to the .css property ;
$("select[name='" + ABC + i + "']").css({"border-color":"red"});
But this is not working either in IE ; Does any one have more suggestions on it ?
Upvotes: 0
Views: 2298
Reputation: 123377
On older IE you cannot change the border of a select
element (and, unfortunately, a lot of other things). That's why it seems it doesn't work
As countercheck, $("select[name='" + ABC+ i + "']").length
should be greater than zero on every browser you're trying (IE included)
If you have to change border I just suggest to wrap your select into another element and set a border-color to that wrapper.
Upvotes: 3
Reputation: 11683
The select element is the last html element you'll ever want to style with css. I once spent hours trying to customize the select element and got nothing but frustration! Don't do anything to it because very browser has it's own little issues with it. Your client has to live with this fact.
Upvotes: 0
Reputation: 76880
I think that the problem is that you can't apply border to a <select>
in he, look at this question IE6/IE7 css border on select element
Upvotes: 1