Skip to content

Instantly share code, notes, and snippets.

@osrecio
Created July 23, 2015 12:51
Show Gist options
  • Save osrecio/ee94ae91c8e732639743 to your computer and use it in GitHub Desktop.
Save osrecio/ee94ae91c8e732639743 to your computer and use it in GitHub Desktop.
Add plus/minus collect click example...
var mierda;
var clickNumber = 0;
console.clear();
$(".box").click(function () {
clickNumber++;
clearTimeout(mierda);
mierda = setTimeout(function(){ console.log("Ajax Function: "+clickNumber);$('.box').removeClass('red').addClass('blue') }, 300);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment