Using jQuery, how can I dynamically set the size attribute of a select box? -


using jquery, how can dynamically set size attribute of select box?

i include in code:

$("#myselect").bind("click",     function() {         $("#myotherselect").children().remove();         var options = '' ;         (var = 0; < 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 ...];     }); }); 

oops, it's

$('#myselect').attr('size', value) 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -