jQuery
/*Detect device*/
function detectdevice()
{
/*This will return TRUE if its Mobile Device otherwise give False*/
return (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
}
console.log(detectdevice());
function detectdevice()
{
/*This will return TRUE if its Mobile Device otherwise give False*/
return (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
}
console.log(detectdevice());
No comments:
Post a Comment