Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css background image is not show change default picture

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
           }
        });
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #css #background #image #show #change #default #picture
ADD COMMENT
Topic
Name
2+1 =