I have a javascript code (below) where a variable with the initial value of 0 is declared.
I want to touch the div, its value is set to 1, and to play a second time, its value is set to 2.
The problem is that when I play the div for the first time it adds 1, but when I do it a second time, it does not keep increasing.
This is the code:
<div id="taptoread"
ontouchstart="if(touch1403171021t < 2){ touch1403171021t++; }"
ontouchmove="if(touch1403171021t > 0){ touch1403171021t--; }"
ontouchend="if(touch1403171021t == 2){alert('ee')};
if(touch1403171021t == 1){
$('#taptoread').css({'opacity':'1'});
$('.1403171021').slideDown(170);}"
style="opacity:0.7;border-radius:7px;padding-
bottom:7px;background-color:lightyellow;margin:0px 7px 0px 7px;"
></div>