Materialize: How Can i enabled and disabled a multiselect way JS/jQuery

Created on 23 Jul 2016  路  2Comments  路  Source: Dogfalo/materialize

I have a multiselect disabled <select multiple disabled>

image

i want to enable the select element (when the checkbox is checked) i try:
$("select").prop('disabled', false) but doesnt work.

thanks for your help.

Most helpful comment

I suppose that after .prop('disabled', false) you need to run $('select').material_select();

Generally, after any operation on materializedselect tag you need to call $('select').material_select(); to sync dropdown with underline hidden select.

All 2 comments

I suppose that after .prop('disabled', false) you need to run $('select').material_select();

Generally, after any operation on materializedselect tag you need to call $('select').material_select(); to sync dropdown with underline hidden select.

@kmmbvnr Thanks You, its works, re-run $('select').material_select();

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heshamelmasry77 picture heshamelmasry77  路  3Comments

cope picture cope  路  3Comments

onigetoc picture onigetoc  路  3Comments

Robouste picture Robouste  路  3Comments

MickaelH974 picture MickaelH974  路  3Comments