Multiselect not working for jquery/bootstrap


Topic: Multiselect not working for jquery/bootstrap

ItIsN3RD pro asked 12 months ago

Expected behaviorhttps://mdbootstrap.com/docs/jquery/forms/multiselect/#basic-exampleActual behavior*it only displays options on screen.*Resources (screenshots, code snippets etc.)

 <link href="css/mdb.min.css" rel="stylesheet">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/mdb.css" rel="stylesheet">
<select class="mdb-select md-form" multiple>
                                                                <option value="" disabled selected>Choose your country</option>
                                                                <option value="1">USA</option>
                                                                <option value="2">Germany</option>
                                                                <option value="3">France</option>
                                                                <option value="4">Poland</option>
                                                                <option value="5">Japan</option>
                                                            </select>

Piotr Urbaniak commented 12 months ago

Hello ItlsN3RD, did You initiate mdb-select using JS code?


I have the same problem. I am working on a laravel project. I have the style and script files in the mix file, I have link and script in the head of the file, i have initiated with

$(document).ready(function() {
    $('.mdb-select').materialSelect(); });

and its not working.

materialSelect() Cannot find declaration to go to


Piotr Urbaniak answered 12 months ago

Hello Simona,
please check if this solution from a similar case solves your problem : solution

If that doesn't help, please send us a sample of your code that causes the error.
Best regards


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.2
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes