Tuesday, May 21, 2013

How to get Multiple Selected Items using jQuery


How to get multiple selected items from a combo box (select/option element) using jQuery in a comma delimited list only using one line of code:

$("#MyList option:selected").map(function(){ return this.value }).get().join(", ");

I know, it's awesome... everyone is wanting to know about this stuff!

Props to Stack Overflow... again!

No comments: