Skip to content

Instantly share code, notes, and snippets.

@NataliaAvila
Created June 11, 2020 12:21
Show Gist options
  • Save NataliaAvila/07ab46de6e2a35c4d68d12c5ba7427d7 to your computer and use it in GitHub Desktop.
Save NataliaAvila/07ab46de6e2a35c4d68d12c5ba7427d7 to your computer and use it in GitHub Desktop.
Check Media Querie with Jquery
$(window).resize(function () {
if ($(window).width() < 992) {
}
});
@NataliaAvila
Copy link
Author

NataliaAvila commented Dec 14, 2020

// Checks if the screen width is less than 992px.

$(window).on('load resize', function () { if($(window).width() < 992) { console.log(window, '< 992') } else { console.log(window, '>= 992') }; });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment