Created
November 27, 2016 20:20
-
-
Save giodc/c52a424b2177e7a73f952eb2ac3c7891 to your computer and use it in GitHub Desktop.
jQuery if, else, with media query
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
jQuery(document).ready(function () { | |
if (document.documentElement.clientWidth < 950) { | |
// do nothing below 950px | |
} | |
else | |
jQuery('.header-widget').css('marginTop', jQuery('.site-header').outerHeight(true) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment