I am trying to detect the bootstrap size (xs/sm/md/lg).
I have tried those links:
Unfortunately,
The answers I have found have "bug" or something like that.
If you log the bootstrap size on window resize event, you would see that you log undefined sometimes.
It happens when you resize the window from bootstrap size one to bootstrap size two.
For example, when you resize from xs to sm.