var windowRes = document.documentElement.clientWidth; if (windowRes <= 1024) { console.log('hello') if(windowRes <= 768) { console.log('yes'); } } There is an idea, but for some reason 'yes' is not displayed on 768. Any idea why?
var windowRes = document.documentElement.clientWidth; if (windowRes <= 1024) { console.log('hello') if(windowRes <= 768) { console.log('yes'); } } There is an idea, but for some reason 'yes' is not displayed on 768. Any idea why?
Source: https://ru.stackoverflow.com/questions/532229/
All Articles