I use Bootstrap 3 for a web page that is created using PHP and HTML.
With the responsive grid and classes on Bootstrap 3 you can assign multiple classes to a div to define different widths depending on the current screen size - exmaple:
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-6">...</div>
This refers to the screen size using col-lg
for large devices, col-md
for medium devices, col-sm
for small devicesand col-xs
for extra small devices.
It works as intended but I am wondering how I can determine which of these classes Bootstrap is using at the moment so that I can show the current size version on the screen.
Is there a way I can determine which of the above grid options / col classes is currently active using PHP (or jQuery)? I could not find a proper solution for this myself.