Search code examples
jquerylistboxasmselect

How to get the selected values using jQuery-asmselect?


This should be real easy. I am using asmselect plugin for my listbox (Html.Listbox). I want to get the selected items of the listbox (asmselect) through Jquery.

Any help in this regard is much appreciated.


Solution

  • I dont know if this is right but I found a way to accomplish it:

    var selectedItems = [];
    $("#asmSelect0 .asmOptionDisabled").each(function(i, selected) {
      selectedItems[i] = $(selected).val();
    });
    alert(selectedItems.join());
    

    Hope this helps someone.