2

I make my first mobile web app, but one fonctionnality doesn't work on iphone: the dblclick() function.

Actually, I want to add a ìmg in favorite when I double click on the picture, but when i double click in the ìmg on Iphone, there is a zoom on the picture.

echo '<div class="section">
    <img id="'.$row['id'].'" class="anim photo" data-delay=".2s" src="'.$row['url'].'">
    <p class="anim_commentaire commentaire ';
     if (in_array($row['id'],$list)) {
         echo "commentaire_like";
     }
    echo '" data-delay=".3s">'.$row['description'].'</p>
</div>';
$(document).ready(function(){
    $("img").dblclick(function(){        
                var ajax = new XMLHttpRequest();
                var method = "GET";
                var url = "like.php?id_photo="+$(this).attr("id");
                var asynchronous = true;
                ajax.open(method, url, asynchronous);
                ajax.send();
                if($(this).siblings().hasClass('commentaire_like')){
                    $(this).siblings().removeClass("commentaire_like");
                }else{
                    $(this).siblings().addClass("commentaire_like");
                }

    });
});

I already try the solutions of other posts but nothing has unlocked me, including <meta />or https://jsfiddle.net/UXRF8/ this for example

This is working on android Phone and on windows computer. Someone know if it's possible to make this possible for IOS?

Thanks

samuel
  • 477
  • 7
  • 21

0 Answers0