Reputation: 4711
I'm building out my jquery mobile app out and have been testing in Chrome. Its the best for me because the debugging is great.
I was using a TAPHOLD event but decided to go away from that for a swipe-right event.
Chrome actually registered the taphold, so I was hopeful that it would register a swipe right with the mouse. But I cannot get it to register unless I have to do something else... anyone?
Upvotes: 21
Views: 33594
Reputation: 20026
A lot of the answers here are old and out of date. As of Chrome 63, swipe is built-in as long as you are in responsive mode with developer tools open. So open Developer Tools (3 dots->tools->developer tools), then click the phone/tablet icon on the left to put Chrome into a mobile mode. Then if you left click and hold, you will see the cursor changed to a dot, and you can swipe.
Upvotes: 13
Reputation: 76003
In desktop browsers I tend to use the right mouse button testing swipes. It will open a context-menu but it actually works (I normally use Chrome 17 and Firefox 10).
For instance when left-clicking and then swiping on an image in Chrome or Firefox it selects the image and you are then moving around the transparent thumbnail of the image. But when right-clicking and swiping the swipe event is fired.
UPDATE
This update is pretty late to the punch but this just shouldn't be necessary anymore. In fact the Chrome developer tools (the ones I'm used to using) have gotten a lot better about emulating devices.
Upvotes: 10
Reputation: 37785
Update: this appears to be enabled in Chrome by default (37.0.2062.120 as of September 2014) you do the following:
Previous answer:
To get this working in the current version of Chrome (32.0.1700.107 as of Feb 2014) you do the following:
Upvotes: 8
Reputation: 9860
By now the actual chrome developer tools (tried chrome 20) can emulate touch and swipe events. You can activate that behavior through the tool options, accessible via the little gear-wheel in the bottom corner.
Just check "Emulate touch events" from the options. Then you can also swipe with your mouse.
Upvotes: 17