Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get multi select dropdown in Materialize css?

I am working on a project which uses Materialize css for front end.

Is there any way to get multi select option for dropdown in Materialize css ?

Any piece of info would be helpful.

like image 399
freshtoUI Avatar asked May 13 '15 06:05

freshtoUI


1 Answers

You only have to add the multiple:

<div class="input-field col s12">
    <select multiple>
        <option value="" disabled selected>Choose your option</option>
        <option value="1">Option 1</option>
        <option value="2">Option 2</option>
        <option value="3">Option 3</option>
    </select>
    <label>Materialize Multiple Select</label>
</div>

And then call js:

$(document).ready(function() {
    $('select').material_select();
});

jsfiddle

like image 139
Brunno Avatar answered Oct 18 '22 21:10

Brunno