This is the blog for getting Idea regarding PHP, Magento, jQuery and JavaScript for Customization.

Saturday, 6 June 2015

jQuery : Detect Mobile Device and identify company

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());
,

No comments:

Post a Comment