2017-05-15 7 views
0

私は下のこの機能を持っていますが、それはiphone6では動作しません:jQuery iPhone用のタッチをクリックしますか?

$(document).on("vclick"... 

をしかし、それはまだ動作しません:

$(document).on("click touch", "a[href^='#']", function (e) { 
    var id = $(this).attr("href"); 
    if ($(id).length > 0) { 
    e.preventDefault(); 

    // trigger scroll 
    scrollMagicController.scrollTo(id); 

     // if supported by the browser we can even update the URL. 
    if (window.history && window.history.pushState) { 
     history.pushState("", document.title, id); 
    } 
    } 
}); 

私はvclickを試してみました。

アイデア?

答えて

0

:-(....私は「タッチ」の使用「タップ」

$(document).on("click tap", "a[href^='#']", function (e) { 
    var id = $(this).attr("href"); 
    if ($(id).length > 0) { 
    e.preventDefault(); 

    // trigger scroll 
    scrollMagicController.scrollTo(id); 

     // if supported by the browser we can even update the URL. 
    if (window.history && window.history.pushState) { 
     history.pushState("", document.title, id); 
    } 
    } 
}); 
+0

がないおかげだと思うが、それはまだ動作しません。 – laukok

関連する問題