check device width using js
const screenWidth = window.screen.width; const screenHeight = window.screen.height;
Source: dmitripavlutin.com
device width js
window.screen.availWidth
Source: www.mediaevent.de
java script find screen size of device
// Size of browser viewport. $(window).height(); $(window).width(); // Size of HTML document (same as pageHeight/pageWidth in screenshot). $(document).height(); $(document).width();
Source: stackoverflow.com
Javascript get device width
const mq = window.matchMedia( "(min-width: 500px)" ); if (mq.matches) { // window width is at least 500px } else { // window width is less than 500px }
Source: stackoverflow.com