how to get that there is mobile user
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
Feel free to ask any question regarding JQuery and JavaScript .
Thankyou
No comments: