Sets a type watcher delay (milisecs) before processing an ajax call.
When a form is auto-posted, this is common to set a grace delay when user is typing before sending the ajax call. data-delay let you set this grace period, better known as type watcher. You can use this option whatever if you are using events or not; it will be applied each time .domAjax is called.
This form looks like this:
<input type="button" value="Click me" class="btn domajax click" data-endpoint="delay-counter-handler.php" data-output="#output" data-delay='2000' /> <div id="output"></div>
This form looks like this:
<label>Default delay, type something:</label> <input type="text" class="domajax keyup" data-endpoint="delay-form-handler.php" data-input="" data-output="#output" /> <br/><br/> <label>Custom delay, type something:</label> <input type="text" class="domajax keyup" data-endpoint="delay-form-handler.php" data-input="" data-output="#output" data-delay="0" /> <br/><br/> <div id="output"></div>
All the documentation at a glance