anelezeravla
Posts: 0
Joined: Tue Oct 01, 2013 12:00 pm

Click event vs tap event

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!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Click event vs tap event

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)

anelezeravla
Posts: 0
Joined: Tue Oct 01, 2013 12:00 pm

Click event vs tap event

Thank you so much, Maryna!

adith visnu
Posts: 0
Joined: Mon Jul 07, 2014 6:32 am

Click event vs tap event

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Click event vs tap event

Hi Adith,

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

adith visnu
Posts: 0
Joined: Mon Jul 07, 2014 6:32 am

Click event vs tap event

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');
}

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Click event vs tap event

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

adith visnu
Posts: 0
Joined: Mon Jul 07, 2014 6:32 am

Click event vs tap event

WOW evgene,

i didn't focus on invisible characters.

Thank you evgene.
Thank you Appery.

Regards

Return to “Issues”