globalQueue = {};
function ajaxDelay (dataURL, delay) {
if (typeof globalQueue[dataURL] !== 'undefined') {
clearTimeout(globalQueue[dataURL]);
}
globalQueue[dataURL] = setTimeout(function() {
ajaxRequest();
}, delay);
}
ajaxDelay ('ajaxUrl', delay);
// http://stackoverflow.com/questions/13480706/how-to-create-delay-before-ajax-call
// https://www.sitepoint.com/delay-ajax-call-seconds/