pufAmuf
pufAmuf

Reputation: 7805

Cannot retrieve values Multiselect Widget

I am using jQuery UI MultiSelect Widget for multiple select, and I would like to retrieve the values for a later php search.

You can find the Jsfiddle here

$("#music").multiselect();

$("#SearchButton").click(function() {
            var MusicStyles = $("music").val();
            alert("Styles Selected "+ MusicStyles);
        });

when I hit search, I get 'undefined'.

Thanks everyone!

Upvotes: 0

Views: 217

Answers (1)

csg
csg

Reputation: 2107

a '#' is missing from the click event. Use

 var MusicStyles = $("#music").val();

Upvotes: 3

Related Questions