-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
If you try to preselect the first or second item you will see don't work:
< select >
< option value='A1>B1' selected='selected' >A1 || B1< /option>
< option value='A1>B2' >A1 || B2< /option >
< option value='A1>B3' >A1 || B3< /option >
< /select >
Only work for the last item in each subselect.
That's because an error on selectPreSelected function.
When you found the selected item you do this:
return $(this).attr('selected', 'selected');
But this is not the way to exit from a jQuery Each, so program continue searching until the end.
The way is using return false;
I fixed the problem changing to:
$(this).attr('selected', 'selected');
return false;
Thanks! I like your work!
Metadata
Metadata
Assignees
Labels
No labels