Pages

Tuesday, August 27, 2013

JavaScript/Jquery to detect platform detail

  While apps design sometimes we may need to do some operations based on the platforms like window,Ipad,android. Below are the code which helps you to identify your platform detail.

$(document).ready(
function () {
      alert(navigator.platform);
 }
);

 Click here for Demo
Below are the code  to find out to detect iPad or not.
 function isiPad(){
 return (navigator.platform.indexOf("iPad") != -1);
}

Reference:


No comments:

Post a Comment