Created
March 31, 2016 17:01
-
-
Save steveobbayi/56fab1926e27ec32c4236e0fcf551031 to your computer and use it in GitHub Desktop.
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
window.onload=function(){ | |
w = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth; | |
var targetWidth = 768; | |
if ( w >= targetWidth) { | |
//Add your javascript for screens wider than or equal to 768 here | |
} | |
else { | |
//Add your javascript for screens smaller than 768 here | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment