Answers for "detect if on mobile device"

0

best way to detect mobile device jquery

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

    if (isMobile) {
        //Conditional script here
    }
 });
Posted by: Guest on November-25-2020
2

how to detect device javascirpt

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
 // some code..
}
Posted by: Guest on July-02-2020

Code answers related to "detect if on mobile device"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language