mdb-select no work


Topic: mdb-select no work

David Gomez (Sonyc) asked 6 years ago

I have the version MDB-Pro_4.5.14
I'm trying to place a select, but it does not work, and check the documentation here: https://mdbootstrap.com/docs/jquery/forms/select/
I do not think I'm doing something wrong, I even included the file: js / modules / material-select.js
But nothing, it does not work. I hope you can help me with this problem that apparently has some others in the pro version.
Thanks in advance.

HTML:
<div class="col-lg-6 col-md-6"><label for="dia" id="dia" class="grey-text"><span class="red-text">*</span>Día</label>
<select class="mdb-select md-form" name="dia" required>
<option selected disabled>Elija un dia</option>
<option value="sab">Sábado</option>
<option value="dom">Domingo</option>
</select>
</div>

JS:

<script>
$(document).ready(function() { $('.mdb-select').materialSelect(); });
</script>

Piotr Glejzer staff answered 6 years ago

Hi,

I checked your code and everything is correct. It's working, check this out.

Can you check your console? You can have some errors, maybe.

This initiation function materialSelect(), it has to be initiated like in a script tag below all other scripts tags like jquery, popper, mdb etc.

Best,

Piotr


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Desktop
  • Browser: firefox, chrome, opera, ie
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No