Materialize material_select is not a function error
it should be formSelect()
rather than material_select()
as you are using 1.0.0
if i am not wrong according to Docs
$(document).ready(function() {
$("#slide-out").sidenav();
$("#selectedTest").formSelect();
});
Here is the html where I use select:
<div class="row">
<div class="input-field">
<select name="status" id="selectedTest">
<option value="public" selected>Public</option>
<option value="private">Private</option>
<option value="unpublished">Unpublished</option>
</select>
<label for="status">Status</label>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
try it works with me I use materialize 1.0.0-beta
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('select');
var options = document.querySelectorAll('option');
var instances = M.FormSelect.init(elems, options); })