I can not seem to append items to a <select> element in Internet Explorer 8. Here is the code, it works perfectly in Chrome and internet explorer 9, is there another way I should do it so that it works in Internet Explorer 8?
$("#" + data[0].Name).append($('<option/>', {
value: data[i].Values[k].Value,
text: data[i].Values[k].Label
}));
Here is the working solution. http://jsfiddle.net/8yFsh/
It worked for me in IE8. below is the code to add option
$('#ptest').
append($("<option></option>").
attr("value","pavan").
text("pavan"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With