Toay i get good script of jQuery that detect mobile.
It require to Jquery file – http://code.jquery.com/jquery-1.8.3.js
Here code is.
$(document).ready(function () { var isMobile = { Android: function () { return navigator.userAgent.match(/Android/i) ? true : false; }, BlackBerry: function () { return navigator.userAgent.match(/BlackBerry/i) ? true : false; }, iOS: function () { eturn navigator.userAgent.match(/iPhone|iPad|iPod/i) ? true : false; }, Windows: function () { return navigator.userAgent.match(/IEMobile/i) ? true : false; }, any: function () { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows()); } }; alert(isMobile.any()) });
Hope it helps you.
Thanks.