I have an anchor which is using jQuery .click event to start a few functions.
jQuery(document).ready(function(){
jQuery('a.slide_circ').click(function(){
do_all_functions();
return false;
});
});
This is the code in short..
Its working as it needs to, every click on anchor class slide_circ start do_all_functions.
But I have a problem there. If user make double clicks they run 2 times or more the functions…
And the how idea go to hell.
I think that I need to disable the double click some way or to set timeout on my function so its not running each time. Can anyone help me ?
Use the
.datamethod to assign the state to the element. Then, usesetTimeoutto reset the state: