I want to add a condition on my website if the browser is from iPhone/iPad to have some specific behavior like when a button is clicked to display a div.
Something like :
<script type="text/javascript">
/* iPhone scripts */
<?php if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')){ ?>
    // window.addEventListener("load",function() {
    // setTimeout(function(){
    // window.scrollTo(0, 1);
    // }, 0);
    // });
   jQuery(document).ready(function() {
}
});
This is just what I've found but I'm not sure this is the way to do it.
 
     
     
    