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 }