Breaking

how to get that there is mobile user

  1. mobile app is a computer program designed to run on mobile devices such as smartphones and tablet computers. Most such devices are sold with several apps included as pre-installed software, such as a web browser, email client, calendar, mapping program, and an app for buying music or other media or more apps.





There is a always problem how to detect is there a mobile user to get app works properly.

we write this for you to get mobile user easy just copy and paste this #javascript code and use it as you want :-

var isMobile = {
    Android: function() {
        return navigator.userAgent.match(/Android/i);
    },
    BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i);
    },
    iOS: function() {
        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    },
    Opera: function() {
        return navigator.userAgent.match(/Opera Mini/i);
    },
    Windows: function() {
        return navigator.userAgent.match(/IEMobile/i);
    },
    any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    }
};


if(isMobile.any()){
 return true;
}else{
return false 
}


Feel free to ask any question regarding JQuery and JavaScript .

Thankyou

No comments:

Powered by Blogger.