Topic: How to detect MDBootstrap version via Javascript
MDB lacks a way to get the version at runtime. Most of libraries expose a way to get the lib version, usually with a variable. As examples:
// Kendo UI Core Version
console.log("KendoUiCore Components Library - v" + kendo.version);
// Microsoft SignalR Version
console.log("@aspnet/signalR - v" + signalR.VERSION);
console.log("@aspnet/signalR-protocol-msgpack - v" + signalR.protocols.msgpack.VERSION);
This is a very useful information when debugging a web site.
Mateusz Łubianka staff answered 5 years ago
Hi,
We don't have any const with MDB version so there is no possibility to get this info via JS. In free version you can get MDB from npm, there is version with package.json inside.
Best,
Grzegorz Bujański staff answered 2 years ago
At the moment we do not plan to add a variable or method that will return the current version of MDB. Especially that we do not recommend using MDB4 and MDB5 in the same project because css classes and components in these classes have the same names, which causes conflicts.
But I will add it to our list of ideas and we will discuss the possibility of adding this feature.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.10.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
soiware pro premium priority commented 2 years ago
This is useful too writing a library working both with mdb4 and mdb5.