samedi 16 juillet 2016

jQuery .html() is very slow for updating options in a dropdown


I tried to use jQuery's html() function to update the selection for a dropdown, but the .html() function takes over 10 seconds for a long "options" string.

How can I make it run faster?

<select class="dropdown">
    ...
</select>

<script>
    var options = "...";
    $('.dropdown').html(options);
</script>

Aucun commentaire:

Enregistrer un commentaire