RsD0p9BK
1/19/2017 - 9:18 AM

jquery__delay_function.js

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/