I want to add li> >> touchstart event to parent On.
Currently, it works. I have a scroll on timeline and I can click on li .
When I add touchstart , I can click one with li , it is better than click on mobile But the problem is, I can not scroll now on timeline ...
, can I separate touchstream, long press Touch-move or something like this?
& lt; Ul id = "timeline" & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; ... & lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; / Ul & gt; $ ("# Timeline") ("& Gt; li") On ("click", function (e) {e.preventDefault (); ...}); I would like to use it:
$ ("# timeline"). ("& Gt; li"). On ("touchstart click", function (e) {e.preventDefault (); ...});
Take a look at this.
Whether it is a long touch or a small touch that can solve the problem for you.
Example:
$ (function () {$ ("# timeline"). ("& Gt; li"). Swipe ({longTap: function (event , Target) {event.preventDefault (); // forward code}, allow the page scroll: "auto"}}}; Next you can enable page scrolling and How it can be controlled:
Comments
Post a Comment