Questions tagged [touchstart]
158 questions
1
vote
1 answer
How to make this javascript "fireworks on click" code to also work on touch screens?
I wanted to make a simple temporary "Happy 2017" page on my site, and I've found on Code.pen a JS code for fireworks that looked pretty interesting:
https://codepen.io/chuongdang/pen/yzpDG
The code works wonderfully with a mouse, as the firework…

Johann Carnasciali
- 13
- 4
1
vote
1 answer
No original event on touchstart
So i'm using JQuery (1.11.3) and I've been stuck on something for which I can't find anything on the web.
Basically, I'm binding a handler to a 'touchstart' event and want to retrieve the position of the touch event. (note: I also tried with…

Robin Nicolet
- 264
- 1
- 7
1
vote
2 answers
on click and on touchstart not working on windows phone
So initially i started by doing $(document).on('click', '.selector, .secondSel', function(){...}) and it usually worked, but now that i added the touchstart event (trying to fix the times when the click event wasn't triggered) alongside the click…

user3847141
- 253
- 2
- 11
1
vote
0 answers
Javascript/JQuery - Controlling the iOS keypad
Based on my previous post where I attempt to fire off an event before the keypad opens on iOS, I am using the "touchstart" option to fire off an event.
Fire Event before 'focus' kicks in / Fire Event before keyboard appears on iOS
This works great,…

Gary
- 395
- 2
- 7
- 24
1
vote
1 answer
Touch Events "touchstart" returns incorrect position on Mobile Safari. Workarounds?
I am developing an HTML5 Canvas project and while adding multitouch support for mobile devices, I seem to have run into an issue on Mobile Safari in iOS 7.1.
The main way that users interact with my app is by clicking and dragging. On the desktop,…

Zack Schilling
- 125
- 1
- 9
1
vote
0 answers
touchstart event not poping up the keyboard
I have a project where I want to automatically popup the keyboard on the focus of the element.
I have bind the touchstart event to the element.
The element is getting focussed but the keyboard is not popping up.
I event tried putting a delay. But…

user3230561
- 445
- 1
- 10
- 21
1
vote
1 answer
Fighting the touchstart event delay on iOS
I'm experiencing a ~500ms delay in Safari for iOS when binding the touchstart event to a KineticJS circle object. I've tried calling event.preventDefault() within the on function, thinking that this would override the default iOS behavior, but it…

David Jones
- 10,117
- 28
- 91
- 139
1
vote
3 answers
How to tell what Javascript event just fired
Is there any way in Javascript to tell what the most recently-fired event was? Reason I'm asking is I'm working on a site that isn't behaving properly on one of those new Ultrabooks that's running Windows 8 and is a laptop with a touch screen. If…

dauber
- 330
- 6
- 20
1
vote
0 answers
prevent touchstart when swiping with touchswipe
I would like to prevent touchstart from occurring when the user swipes through thumbnails,
at the moment when they swipe touchstart is also activated, is there a way to prevent this, here's my code:
$(document).on('touchstart click', '#thumbs a',…

user1937021
- 10,151
- 22
- 81
- 143
1
vote
1 answer
touchstart firing twice on iphone
I'm using this to hide/show a menu on small screen touch devices:
$('.menuButton').bind('touchstart',function(e){
e.preventDefault();
$('nav.mainNav ul li').toggle();
});
It appears to be firing twice on iphone, quickly displaying and…

Geoff
- 317
- 5
- 16
1
vote
1 answer
toggleClass dropdown not working on Ipad
I am creating a script that will show drop down menus under my navigation items on a Desktop, Ipad or tablet.
Right now the dropdowns are showing when I test this on a desktop, but not on an Ipad.
I tried adding alerts to see if they show when I tap…

user1836025
- 209
- 4
- 14
1
vote
1 answer
HTML canvas jquery mobile issue
I'm tring to use the "touchstart" mobile event and the HTML5 canvas to draw something using jquery mobile !
I use this html code :
and Js code :
canvas =…

user1948593
- 45
- 1
- 6
1
vote
0 answers
Inconsistent TOUCHSTART event in Android 4.0 "Ice Cream Sandwich"
I've noticed that BUTTON elements receive TOUCHSTART events very inconsistently in Android 4.0. I added event listeners on a particular BUTTON for the TOUCHSTART, MOUSEDOWN and CLICK events and on all of our Ice Cream Sandwich test devices the…

natlee75
- 5,097
- 3
- 34
- 39
1
vote
1 answer
jQuery: Stop Second Bound Event From Firing After First Event Is Recognized
In jQuery you can bind two events to one jQuery object. How do I stop the second event from firing once the first one is initiated? If I click on my element, touchstart fires right away. But if I keep my finger held down on the element, then the…

Alex
- 1,112
- 4
- 16
- 30
1
vote
6 answers
Closing jQuery Tools tooltip on iphone/ipad with touchstart
I have the following code being run if an iphone/ipad/ipod is detected:
$('.tooltip-trigger').tooltip({offset: [20, -110],relative:true, events: { def: 'touchstart,blur'} });
I have got the initial touch working instead of on hover by declaring…

Friendly Code
- 1,585
- 1
- 25
- 41