I ma trying to retrieve the options selected from a listbox using jQuery. Here is the code.
$('#rt_select').click(function(e) {
var selectedOpts = $('#source-listbox option:selected');
}
I know that selectedOpts is an object so how to fetch the values of the options selected from this Object?
Like this,
str = "";
$.each(selectedOpts, function (index, value) {
str += value+" ";
});
alert(str);