Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

best way to detect mobile device jquery

$(function() {      
    let isMobile = window.matchMedia("only screen and (max-width: 760px)").matches;

    if (isMobile) {
        //Conditional script here
    }
 });
Comment

check if device width is mobile jquery

if ($(window).width() < 700)
Comment

PREVIOUS NEXT
Code Example
Javascript :: arrow not showing react slick 
Javascript :: generate otp using javascript 
Javascript :: delete dir nodejs 
Javascript :: angular pipe first letter uppercase 
Javascript :: strike react native 
Javascript :: jquery get form data 
Javascript :: trigger button click jquery 
Javascript :: js new line regex 
Javascript :: uuid v4 react 
Javascript :: get height and width of screen in react native 
Javascript :: get all values checked checkboxes jquery 
Javascript :: select a label from jquery using for attribute 
Javascript :: remove special characters regular expression 
Javascript :: show password on click button jquery 
Javascript :: update node js ubuntu 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: jquery disable select 
Javascript :: jquery add class 
Javascript :: javascript anagram check 
Javascript :: find sibling in jquery 
Javascript :: disable eslint for react project 
Javascript :: jquery set select readonly 
Javascript :: Codewars Beginner Series #3 Sum of Numbers 
Javascript :: react scroll to bottom of div 
Javascript :: base64 decode javascript 
Javascript :: puppeteer how to serch for text 
Javascript :: javascript fill 2d array 
Javascript :: loop 
Javascript :: javascript byte array to hex string 
Javascript :: how to find index of max number in js 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =