Page 1 of 1

Click event vs tap event

Posted: Tue Nov 26, 2013 4:44 pm
by anelezeravla

Hello,
We would like to know better the differences between tap and click events. We have checked the jquery docs, but still wanted to know:

  1. Generally speaking, is tap faster than click? (as this posts says: https://getsatisfaction.com/apperyio/...)

  2. Can we use tap event carelessly instead of every click event that we have? (our mobile app has several clicks, but all of them involve touching the screen)

  3. If 1 and 2 are both 'yes', is there any reason why Appery tutorials always use click instead of tap?

    All help and experience is welcome. Thanks a lot!


Click event vs tap event

Posted: Tue Nov 26, 2013 6:59 pm
by Maryna Brodina

Hello!
1) Yes, tap event is faster than click on 0,3 seconds
2) Yes, you can
3) I think it's connected with the fact that Click event is supported by all browser and devices (event old one)


Click event vs tap event

Posted: Wed Nov 27, 2013 4:19 pm
by anelezeravla

Thank you so much, Maryna!


Click event vs tap event

Posted: Wed Jul 16, 2014 2:27 am
by adith visnu

Hi all. this topic was 8 months ago. but i hope, my questions still relevant.

it's :
if i want to change a text on button, why i should click twice to changing value for first time, the second time is only need single click to change the value

thanks, i hope i can get some fast responses and explain too


Click event vs tap event

Posted: Wed Jul 16, 2014 3:10 am
by Illya Stepanov

Hi Adith,

Could you please show us how you have implement this functionality?


Click event vs tap event

Posted: Wed Jul 16, 2014 3:16 am
by adith visnu

this is code if button clicked

var kondisi = Appery('track').text();
//alert(kondisi);

if (kondisi==="TRACK"){
Appery('track').text('STOP');
}else{
Appery('track').text('TRACK');
}


Click event vs tap event

Posted: Wed Jul 16, 2014 11:22 am
by Evgene Karachevtsev

Hello,

In the text of the button there are invisible characters (spaces, line breaks), which do not allow condition to work for the first time. You should try this way:

prevar kondisi = Appery('track').text();
kondisi = kondisi.trim();
if (kondisi==="TRACK") {
Appery('track').text('STOP');
} else {
Appery('track').text('TRACK');
}/pre


Click event vs tap event

Posted: Thu Jul 17, 2014 12:43 am
by adith visnu

WOW evgene,

i didn't focus on invisible characters.

Thank you evgene.
Thank you Appery.

Regards