JQTouch - links in li not working after scrolling

帅比萌擦擦* 提交于 2019-12-12 05:58:39

问题


I have a sorted list using JQTouch. The list contains about 20 li-elements containing different links. The first li's that are on the screen without scrolling are working just fine. But after I scrolled down on my iPhone the links are no longer working.

Here is a snippet of the code:

<ul class="rounded">
<li class="arrow"><a id="1" href="#opdracht">1. Typical Amsterdam</a></li>
<li class="arrow"><a id="2" href="#opdracht">2. Route</a></li>
<li class="arrow"><a id="3" href="#opdracht">3. Directions</a></li>
<li class="arrow"><a id="4" href="#opdracht">4. Shops</a></li>
---
<li class="arrow"><a id="5" href="#opdracht">9. Sightseeing</a></li>
<li class="arrow"><a id="6" href="#opdracht">10. Contact</a></li>
</ul>

I really don't know what I am doing wrong. I hope someone can help me out.

For an example, please visit: http://www.wappdesign.nl/teamuitje on your iPhone and try to visit the link after scrolling.


回答1:


In jqtouch.min.js file

in the 'handleTouch' function there is:

startX = event.changedTouches[0].clientX,
startY = event.changedTouches[0].clientY,

these lines need to change to:

startX = event.changedTouches[0].pageX,
startY = event.changedTouches[0].pageY,

Please ref this link https://github.com/senchalabs/jQTouch/issues/297



来源:https://stackoverflow.com/questions/12184859/jqtouch-links-in-li-not-working-after-scrolling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!