Sometimes this is required. To do this use:
var winSize = window.outerWidth; if(winSize === undefined){ winSize = $(window).width(); } console.log(winSize); if (winSize > 480) { // change style for non-mobile } else { // change style for mobile }
Sometimes this is required. To do this use:
var winSize = window.outerWidth; if(winSize === undefined){ winSize = $(window).width(); } console.log(winSize); if (winSize > 480) { // change style for non-mobile } else { // change style for mobile }
Mark Wong is a front end developer with 10+ years experience. Most of his knowledge of HTML5, CSS and Js is self taught.
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Leave a Reply