-
-
Save nocodesupplyco/c9462262318be3df9b33e23ccfe55c3f to your computer and use it in GitHub Desktop.
Hide/Show Based on Breakpoints and Count of Items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
navDesktop(); | |
navTablet(); | |
navMobile(); | |
$(window).resize(navDesktop); | |
$(window).resize(navTablet); | |
$(window).resize(navMobile); | |
}); | |
function navDesktop() { | |
if ($(window).width() >= 1024) { | |
// do something | |
} | |
} | |
function navTablet() { | |
if ($(window).width() < 1024) { | |
// do something | |
} | |
} | |
function navMobile() { | |
if ($(window).width() < 768) { | |
// do something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment