How to get the viewport size: We have different options. Use It wisely
1 2 3 4 5 |
$(window).width() document.documentElement.clientWidth window.innerWidth window.outerWidth @media breakpoint |
http://responsejs.com/labs/dimensions/ JS Bin
1 2 3 |
window.screen.width window.screen.availWidth @media breakpoint |
JS Bin Solution 1: correctedViewportW() function correctedViewportW is a custom function that further normalizes browser difference, and is now the technique usedRead more…