Using jQuery, how can I dynamically set the size attribute of a select box?
I would like to include it in this code:
$("#mySelect").bind("click",
function() {
$("#myOtherSelect").children().remove();
var options = '' ;
for (var i = 0; i < myArray[this.value].length; i++) {
options += '<option value="' + myArray[this.value][i] + '">' + myArray[this.value][i] + '</option>';
}
$("#myOtherSelect").html(options).attr [... use myArray[this.value].length here ...];
});
});