delay keyup using ajax call

delay keyup using ajax call

hi i need some help with delaying keyup on an ajax call.

i have 4 input boxes within the html which generates a price - it's all working as it should be i cannot enter 10 for example as ajax is triggered to update the price as soon as i enter 1.

this is my code.

  1. $("#ajaxform").bind('rightnow change keyup', function(e) {
  2.     $.ajax({
  3.         type: "POST",
  4.         url: "<?php echo ROOT; ?>ajax.php",
  5.         data: $('#ajaxform').serialize(),
  6.         success: function(html) {
  7.             $("#ajaxresults").html(html).show();
  8.         }
  9.     });
  10. })
  11. .triggerHandler("rightnow");
  12. });