JQuery filling an option tag with a lot of data makes browser crash

sharaq

New Member
When I use the following code\[code\]var html = "";$.map(data.modelTypes, function (item) { html+= "<option>" + item.type + "</option>";});$("#drowdown").html(html);\[/code\]there is so much HTML my javascript has to add to the $("#dropdown") element it makes any browser crash for a couple of seconds, in the end it works as it should and fills up the dropdown list but is there anyway of making my browser not crash?
 
Back
Top