css background image is not show change default picture

59

$("html").css({ "background-image": "url('../images/pattern%20copy.png'), url('../images/visuals/visual3-edit.jpg')", "background-position": "center", "background-repeat": "no-repeat", "background-attachment": "fixed"  });
var imageURLs = $('div');
imageURLs.each(function(index, element){
    var imageURL = $(element).css('background-image').replace('url("', '').replace('")', '');
    if (imageURL != "none"){
        $.ajax({
           url: imageURL,
           type: 'HEAD',
           error: function(){
              //error handling for broken image url
           }
        });
    }
});

Comments

Submit
0 Comments