95
rated 0 times
[
100]
[
5]
/ answers: 1 / hits: 97510
/ 13 Years ago, tue, april 5, 2011, 12:00:00
I have a select element that allows for multiple selections. I'd like to display the selected values in another part of the page (in a div or something) as the user makes changes to what is selected.
Is the only way of doing this to iterate over the options and check if selected is true? this would not be preferable since each onchange event would require the entire select element to be iterated over.
Here's a fiddle that demonstrates how I am currently doing it, but I'm hoping maybe there's a better way than having to iterate over all the options on every change: multiple select elment onchange fiddle
More From » jquery