Hi There,
I have some code (below) that does an ajax call on keyup of a form
field. It works great.....but I really want to pause the call for 1
sec after they do the keyup to allow them to put in some text. Is
there a way to take this code and do that?


$(document).ready(function(){
        $('#search').keyup(function() {
                var searchVal = $('#search').val();
                $.ajax({
                        type: 'GET',
                        url: 'qryget_customers.php',
                        data: 'search=' + searchVal,
                        dataType: 'html',
                        beforeSend: function() {
                                $('#search_slips').html('<img 
src="../common/images/ajax-
loader.gif" alt="loading..." />');
                        },
                        success: function(response) {
                                $('#search_slips').html(response);
                        }
                });
        });
});

Reply via email to