I'm trying to create a select
that gets its options via JavaScript or jQuery, the data is stored in an array.
Example:
for (i = 0; i <= cidades.length; i++) {
$('select').append('<option>' + cidades[i] + '</option>');
}
But they do not show up. does append()
not work in this case?