Hello,
i have a function which returns a certain ammount of data triggered in AJAX when typping.
But, as soon as i type "long" string like "hello my name is", it launches a single request each time i type a key (10request at a single time and it takes 5 seconds to get 1 request response).
How to avoid that please ? (i don't want to use .onblur)
$(document).ready(function()
{
$('.search input[type="submit"]').hide();
$('#search_keywords').keyup(function(key)
{
if (this.value.length >= 2 || this.value == '')
{
$('#loader').show();
$('#jobs').load(
$(this).parents('form').attr('action'),
{ query: this.value + '*' },
function() { $('#loader').hide(); }
);
}
});
});
Thank you ;)