how do you deal with touch events
# July 14, 2013 at 11:14 am
hello so how are poeple dealing with taps and scrolls on the tablets and smart phones?
so far ive been using jquery and I do something like this based on things ive read I strung this together:
so how do you use touch event cause this might look a bit like over kill.
basically I check if its a moblie device, then use ‘click’ or ‘touchstart’.
then after touchstart I add a touchend so the event fires right away. or I decide what to do on scroll although I have never dealt with the scroll direction…
ive never used jquery mobile… it looks more look jquery ui which I dont either use… i like styling and making thi stuff myself if i can# July 14, 2013 at 11:40 am
no, click takes 3 or four seconds to work so it looks like it has lag… because its waiting to see if you do something else besides click
see here is the same code just no touchstart or end or any touch events… watch on your mobile device the difference between the codpen above and this one:
notice this one lags a bit?
You must be logged in to reply to this topic.