Topic: materialSelect is not a function
Madhumohan Harikumaran Nair free asked 1 year ago
Uncaught TypeError: $(...).materialSelect is not a function
I am using $('.mdb-select').materialSelect(); I Got working with html but when I put the same in cshtml for dropdown is not working its showing Uncaught TypeError: $(...).materialSelect is not a function.
But my date picker class="form-control datepicker" in the same page is working..
Below code is working
input placeholder="Selected date" type="text" id="date-picker-example" name="OrderDate" class="form-control datepicker" width="250"
<select id="ListExample" class="mdb-select md-form colorful-select dropdown-success"> <option value="0">Select an Option</option> </select> <label class="mdb-main-label">Select Options</label> <!--/Blue select-->
I am using the script in below order
Thank you for your comment. I am attaching the screen shot of working and not working scripts in cshtml.
But fortunately Both working in html.
" Please make sure you load all necessary mdb files before invoking the material select code"
Now its working...
Normally I used to do in asp.net core in the shared Layout this format is followed and your code all working except select
< html> < head > CSS Extra </head> <body> <div> @Renderbody() <div> <script> </body> </html>
Now I changed the script from bottom to top inside head its working...
Anyway now its working... but little bit confused.
Anyway thankyou very much
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: MDB4 4.19.2
- Device: Laptop
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No