I've an ajax call to set of urls to get html content. But some of the urls are taking long time to get the content, i'm okay to skip those which take more than say 1 sec.
    for (url in list) {
    $.ajax({
        'url': url,
        type: 'get',
        timeout: 1000,
        success: function () {
            //doSomething
        },
        complete: function () {
            //what to write?
        }
    });
}
Can you help me in how to abort the ajax call if it timeouts and execute the complete function.
Lemme know if i'm not clear. Thanks