Search code examples
csshtmlmaterialize

Materialize framework hides <select> html5 elements


I have this Fiddle which contains a <select> element that should display a dropdown list. This works fine if I add class="browser-default" to the <select> tag, but if I remove it, the dropdown list is hidden, Anyone encounter this problem??Thanks

Need to mention that I need the materialize css added to the dropdown.


Solution

  • You should include this code in your js:

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

    This code help you to override browser defaults and run your JS. This code should be included after Materialize script.

    Here is JSFiddle. And din't forget to include jQuery to your HTML.