Skip to content

Instantly share code, notes, and snippets.

@eljamez
Last active December 21, 2015 13:38
Show Gist options
  • Save eljamez/6313562 to your computer and use it in GitHub Desktop.
Save eljamez/6313562 to your computer and use it in GitHub Desktop.
CoffeeScript + Jquery : quick function to get browser width and height
$ () -> #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