Speed Fix: How to Remove the 300ms Delay in jQuery Mobile Apps

后端 未结 4 1182
孤独总比滥情好
孤独总比滥情好 2020-12-13 21:11

How do you remove the click/tap delay from mobile Safari on iOS?

I have fiddled around with event listeners quite a bit, and have used a bunch of different scripts (

4条回答
  •  轮回少年
    2020-12-13 22:08

    This is working for me. Whenever a new page is added into the dom, we can then attach fast click to all the links...

     // when new pages are loaded into the DOM via JQM AJAX Nav, apply ko bindings to that page's DOM
    $(document).on('pageinit', '.ui-page', function (event, data)
    {
        var activePage = $(event.target).get(0);
        FastClick.attach(activePage);
    });
    

提交回复
热议问题