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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -