Been looking for a debounce function or way to debounce in Jquery. The build up of animations can get super annoying. Heres the code:
function fade() { $(\
I don´t like the idea to include a library just for a debounce function. You can just do:
var debounce = null; $('#input').on('keyup', function(e){ clearTimeout(debounce ); debounce = setTimeout(function(){ $.ajax({url: 'someurl.jsp', data: {query: q}, type: 'GET'}) }, 100); });