I have a Materialize Multiple Select element. But I can't seem to find a way to retrieve the selected values. Does anybody know how you can retrieve the selected values?
Here's the look when you select it:
Heres how it looks when you close it:
But the question is how to retrieve the values inside the selector when closed.
EDIT: I am using Materialize CSS (http://materializecss.com)
<mat-select> is a form control for selecting a value from a set of options, similar to the native <select> element.
Materialize provides a container for embedded videos that resize them responsively. To do this, wrap them with the containing div, which adds the class video container. And the third class is a responsive video.
Materialize CSS is a design language that combines the classic principles of successful design along with innovation and technology. It is created and designed by Google. Google's goal is to develop a system of design that allows for a unified user experience across all its products on any platform.
You can get it with basic jQuery; there's nothing special about the Material markup.
For a select like this:
<select id="mySelect" multiple>
<option value="1" selected>Option 1</option>
<option value="2" selected>Option 2</option>
<option value="2">Option 2</option>
</select>
$('#mySelect').val()
will return an array of selected values: ["1", "2"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With