automatically select option if only one in selectbox list - JQuery -


i using this way filter select box. want extend if there 1 option left automatically selected. can me this?

if ($j('#selectlist option:visible').length == 1) {     $j('#selectlist option:visible').attr('selected', true); } 

Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -