Set Viewport for iPhone iPod and iPad by Javascript jQuery

Your website content not clearly visible in iPhone, iPod or iPad devices, and looking very tiny small than 99% issue with view port meta tag value set for iPhone, iPod and iPad. You have to change viewport meta value for such device 1.0001 instead of 1 that is default set in your website by eight theme or plugin ( if site with Wodrdpress ) or by your website developer.

To change it for specific device Javascript jquery script can help us by dynamically change it once page document is ready after load. add following script in your site loaded any javascript (.js) file and check it hows it working. make sure it not getting conflict with existing script.

jQuery( document ).ready(function() {

if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
document.querySelector('meta[name=viewport]')
.setAttribute(
'content', 
'initial-scale=1.0001, minimum-scale=1.0001, maximum-scale=1.0001, user-scalable=no'
);
}
});
Scroll to Top