问题
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