Topic: How to detect MDBootstrap version via Javascript

fmaeseele pro asked 3 years ago


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.


soiware priority commented 3 months ago

This is useful too writing a library working both with mdb4 and mdb5.


Grzegorz Bujański staff answered 3 months 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.


Mateusz Łubianka staff answered 3 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,


soiware priority commented 3 months ago

Please add a native check procedure. Thank you.



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: 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