why isnt background-image working css code example

Example 1: background isn't working if in separate css file

background-image: url(../picture-folder/your-picture.png) 0 0; 
//No quotes, two dots before "/"
//Also make sure that your <img> in html has some transparent image as src

Example 2: 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
           }
        });
    }
});

Tags:

Css Example