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

ericlormul picture ericlormul  路  3Comments

alexknipfer picture alexknipfer  路  3Comments

acierpinski picture acierpinski  路  3Comments

Robouste picture Robouste  路  3Comments

PhillippOhlandt picture PhillippOhlandt  路  3Comments