Materialize: Is it posible to disable particular select element?

Created on 19 May 2016  路  5Comments  路  Source: Dogfalo/materialize

Hello,

I've implemented the MaterializeCss in our Magento template, and some of the dropdowns (select elements) are causing malfunctions. Is it posible to disable particular select elements?

In case anybody know's how to fix it, Magento has the shipping price calculator and when the country is chosen, the Province dropdown is not beeing updated, if you can suggest a better way to fix it without disabling the Material styling, it would be great help.

Thank you and waiting for your reply,

Best wishes,
Arthur

Select question

Most helpful comment

Try $('select').not('.ignore').material_select()?

All 5 comments

@epiblue You don't have to bind to all selects on the page, the documentation gives the example: $('select').material_select(); which is for all select DOM elements. If you want to limit it to a specific set, add a class to the selector i.e. $('select.materialize').material_select();

@acupajoe

Thanks for your reply, Yeah I saw this, but the thing is that, there are quite a few select elements all over the site, and the $('select').material_select(); is perfect to affect all.

It would be nice to have something to ignore a particular select option, you know what I mean?

For example: $('select.ignore').material_select_ignore();

I hope I'm explaning myself,

Best wishes and thanks for the reply,

Try $('select').not('.ignore').material_select()?

It's to you to specify your elements. You should try @acupajoe solution.

Closed due inactivity, feel free to reopen it if it is still necessary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artur99 picture artur99  路  3Comments

MickaelH974 picture MickaelH974  路  3Comments

ReiiYuki picture ReiiYuki  路  3Comments

bradley-varol picture bradley-varol  路  3Comments

PhillippOhlandt picture PhillippOhlandt  路  3Comments