Topic: MDB5 Alert throws error if called by JS
jczeledonp
pro priority asked 6 days ago
Expected behavior
mdb.Alert.getInstance(document.getElementById('show-example')).show();
Actual behavior
Firefox: Uncaught TypeError: can't access property "show", mdb.Alert.getInstance(...) is undefined
Chrome: Uncaught TypeError: Cannot read property 'show' of null
Resources (screenshots, code snippets etc.) I'm using MDB5 PRO 3.3 version. Also tried with new MDB5 3.4 version but it comes with mdb.min.js 3.3.0 , NOT 3.4.0.
In your website works with 3.4, not with older versions. But I can't get the mdb.min.js 3.4.0 version
Open
- User: Pro
- Premium support: No
- Technology: MDB 5
- MDB Version: 3.2.0
- Device: Laptop
- Browser: Chrome, Firefox
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Grzegorz Bujański staff commented 6 days ago
Check out my example: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2946212#html-tab-view
It works fine. Can you send your example which causes this error?