taphold

how to get the element on which taphold is fired(jquery mobile)

三世轮回 提交于 2019-12-12 03:18:18
问题 Can you please help me to locate on which element "taphold" is fired by using js, jquery or jq mobile. my html structure is like mentioned below <script> $(document).on("pagecreate", function () { $("#myFilesListView").bind('contextmenu', function (event) { event.preventDefault(); event.stopPropagation(); return false; }); }); $(document).ready(function () { $("#myFilesListView").bind("taphold", function (event) { event.preventDefault(false); event.stopPropagation(); var ID = $(this).child()

How to disable “swipe” for taphold

送分小仙女□ 提交于 2019-12-11 12:40:45
问题 I have found that the taphold (longclick) function for jquery mobile also seems to cause elements to change the same way by "swiping" as well. A quick proof of this undesired effect is: http://api.jquerymobile.com/taphold/ If I "swipe" the box well before 750ms it changes color and it bypasses me having to do a taphold (longclick). As well as this: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_events_taphold If I "swipe" the text it also dissapears the same way taphold