Posts by FLyP • 46 points
2 posts
-
0
votes1
answer1326
viewsA: How to invoke function at the first click of the button and another at the second click
Man, I don’t know if this is the best practice, but it worked for me Jquery var cont = 0; $( "#teste" ).click(function() { if(cont == 0) { a(); cont += 1; } else { b(); cont = 0; } }); function a(){…
-
2
votes1
answer1008
views