Skip to content

Instantly share code, notes, and snippets.

@davelab
Last active December 27, 2015 09:09
Show Gist options
  • Save davelab/7301274 to your computer and use it in GitHub Desktop.
Save davelab/7301274 to your computer and use it in GitHub Desktop.
media queries control for jquery
var winWidth = $(window).width();
if (winWidth <= '320') { //iPhone only Portrait orientation
}else if (winWidth >= '321' && winWidth <= '480') { //iPhone Landscape orientation
}else if (winWidth >= '481' && winWidth <= '768') { //iPad Portrait orientation
}else if (winWidth >= '769' && winWidth <= '1024') { //iPad Landscape orientation
}else if (winWidth >= '1025' && winWidth <= '1280') { //Desktop and Laptop
}else if (winWidth >= '1281') { //Desktop large screen
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment