Using the add function for appending option tags onto elements might help.
var i = 0, select = $("select"), opt = $('<option></option>'); for (; i < 1000; i++){ var o = opt.clone(); try { select.add(o, null); // standards compliant; doesn't work in IE } catch(ex) { elSel.add(o); // IE only } } On Jan 23, 9:44 am, roosteronacid <roosterona...@gmail.com> wrote: > Consider the following: > > var i, select = $("select"); > > for (i = 0; i < 1000; i += 1) > { > select.append("<option>"); > > } > > Performance in Internet Explorer is terrible. So is: > > var a = [], i, select = $("select"); > > for (i = 0; i < 1000; i += 1) > { > a.push("<option>"); > > } > > select.append(a.join()); > > Besides creating a wrapper element, manually constructing HTML code > and using the innerHTML property on that wrapper-element, what can I > do to increase performance? (Performance in Internet Explorer in > particular).