Materialize CSS - Select Doesn't Seem to Render

前端 未结 14 1116
独厮守ぢ
独厮守ぢ 2020-11-29 20:32

I am currently working with materialize CSS and it seems I\'ve gotten snagged with the select fields.

I\'m using the example provided from their site but unfortunate

相关标签:
14条回答
  • 2020-11-29 21:32

    This works too: class = "browser-default"

    0 讨论(0)
  • 2020-11-29 21:34

    I found myself in a situation where using the solution selected

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

    for whatever reason was throwing errors because the material_select() function could not be found. It was not possible to just say <select class="browser-default... Because I was using a framework which auto-rendered the the forms. So my solution was to add the class using js(Jquery)

    <script>
     $(document).ready(function() {
       $('select').attr("class", "browser-default")
    });
    

    0 讨论(0)
提交回复
热议问题