Questions tagged [touchmove]

140 questions
2
votes
1 answer

toggleClass when reaching bottom of page

There is the code I use in order to change the css of my sticky header when a user start scrolling. I would like to keep it like that but I'm looking to change my sticky header back to its original css class (#header_container) when the user…
imromains
  • 99
  • 9
2
votes
0 answers

jQuery function not running without .html() inside

I'm trying to make a phone app with phonegap, and want to make a menu I can drag in from the left. This code is working as I want it to (at this stage), but if I remove the line $("#myElement").html(changePos); from the touchmove function, it stops…
2
votes
1 answer

Detecting touchstart while detecting touchmove

I've been plugging away at a project recently and up until now I've been using chromes debugger mobile emulator. This means I've been able to simulate touches and dragging behaviors with my mouse. Unfortunately because of just having one mouse I…
2
votes
0 answers

jQuery enable function on touchstart but not with touchmove event

I have a responsive dropdown menu that only opens on touch or click then closes when clicking or touching anywhere outside the menu. problem occurs if mobile user simply wants to swipe further down the page, as soon as they touch to scroll, the…
MilkyTech
  • 1,919
  • 2
  • 15
  • 39
2
votes
1 answer

Can't scroll anymore on touchstart

I want to add touchstart event on my li without disabling scroll on the parent. Currently, it works. I have the scroll on timeline and I can click on li. When I add touchstart, I can click one of the li, it's better than click on a mobile. But the…
Steffi
  • 6,835
  • 25
  • 78
  • 123
2
votes
1 answer

Can't vertically drag a view in Android

I'm working in Titanium SDK 3.1.1 and deploying to an Android 4.0 device. I'm trying to drag a View in any direction, but while the touchmove event is being fired, something goes wrong and the event is interrupted. The touchmove event works as long…
Uriel Arvizu
  • 1,876
  • 6
  • 37
  • 97
2
votes
1 answer

how to use touchmove to complement mousemove for androids

What difences should i be aware of when tring to complement a working function that use mouse move in to also work on smartphones. So far have i learned that on my android i get touchmove insted of mousemove, touchstart insted of…
Puggan Se
  • 5,738
  • 2
  • 22
  • 48
2
votes
2 answers

html5 canvas - touchmove - how to calculate velocity and direction?

So I want to measure how fast and what direction a user swipes on an html5 canvas? Seems like there should be something already written to do this so I dont have to re-invent the wheel, but I cant find anything. Anyone know of a JavaScript…
Joelio
  • 4,621
  • 6
  • 44
  • 80
2
votes
0 answers

How to determine I am currently processing the last touchmove event?

As I determined in this topic, the touchmove event is liable to be sent in batches depending on the combination of elements being touched. If I have three fingers each touching a different element, but I still want to be able to process the motion…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
2
votes
3 answers

JavaScript prevent touch move on body element, enable on other elements

but very simply, I'd like to prevent the touchmove event on the body element but leave it enabled for another element. I can disable fine... but I'm not sure how to re-enable it somewhere else! I imagine that the below theoretically works because…
technopeasant
  • 7,809
  • 31
  • 91
  • 149
2
votes
0 answers

click and hold to scroll, touchstart, touchmove, touchend

I have a scrollable div. I want people to be able to scroll the list through 'hold', and also select a button for click. The problem is that when a button is held in order to scroll the div, it is triggering the click function. I want that do not…
LGVentura
  • 1,547
  • 1
  • 11
  • 17
2
votes
4 answers

document.addEventListener("touchmove", preventBehavior, false); - prevents me using from using overflow: scroll; - work around?

Im using phonegap to build an ios app, so that you cant move the window phonegap uses document.addEventListener("touchmove", preventBehavior, false); which is fine... but it also prevent me from using the css overflow:scroll on a section of text. Is…
sam
  • 9,486
  • 36
  • 109
  • 160
1
vote
1 answer

Vuejs: Touchmove fired but always return on the first item when touchstart

I have question related to touch event with Vuejs. I want to join some number with mouse event (for PC) and touch event (for Mobile Devices) like this:
Hai Tien
  • 2,929
  • 7
  • 36
  • 55
1
vote
1 answer

Trigger JS function only when tap ends

I made a lightbox that runs on Javascript and I recently added a function where swiping left or right on mobile changes the image that appears. However, the code I'm using triggers the function every time my finger moves a few pixels. I want the…
Alexander
  • 131
  • 9
1
vote
1 answer

touchmove Event not firing on iPhone Safari

Does the touchmove event NOT work on the iPhone's Safari browser? I'm not talking about an iOS App, just a regular old HTML page with some Javascript and jQuery that's loaded into the iPhone's Safari Browser. I actually connected my iPhone to my…
Sirab33
  • 1,247
  • 3
  • 12
  • 27
1 2
3
9 10