Skip to content

Instantly share code, notes, and snippets.

@ToLive
ToLive / detect-mediabreak.html
Last active July 15, 2018 13:28
Block to HTML and Javascript to detect bootstrap 4 media breakpoints.
<span id="mq-detector" class="invisible">
<span id="size-xs" class="d-none d-sm-block"></span>
<span id="size-sm" class="d-sm-none d-md-block"></span>
<span id="size-md" class="d-md-none d-lg-block"></span>
<span id="size-lg" class="d-lg-none d-xl-block"></span>
<span id="size-xl" class="d-xl-none"></span>
</span>
<script>
$(function() {