jQuery check status

Posted by Happy on Stack Overflow See other posts from Stack Overflow or by Happy
Published on 2010-06-17T09:59:25Z Indexed on 2010/06/17 10:03 UTC
Read the original article Hit count: 235

Filed under:
|

This function everytime gives "false", even if image_url exists

// some .each {
    var item = $('.item', this);
    $.ajax({
        url: image_url,
        success: function() {
            item.html("true");
        },
        error: function() {
            item.html("false");
        }
    });
// }

Its used to check existance of image_url file - this variable gives url like http://blog.com/teddybear.png

Any idea?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX