Last active
December 21, 2015 13:38
-
-
Save eljamez/6313562 to your computer and use it in GitHub Desktop.
CoffeeScript + Jquery : quick function to get browser width and height
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 starter upper! | |
# browser window var | |
$browser_window = $(window) | |
# function | |
window_info = -> | |
console.log '----------------BROWSER WIDTH AND HEIGHT-------------------' | |
console.log $browser_window.width()+' is the browser width || '+$browser_window.height()+' is the browser height' | |
# function call | |
window_info() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment