Vérifiez si Div contient l'image d'arrière-plan

// HTML EXAMPLE
<div id="element2" class="element"></div>

//Css example .element {
  background-image: url('http://www.todayifoundout.com/wp-content/uploads/2010/05/blue-sky.jpg');
  width: 350px;
  height: 350px;
}
//your script JS
var background = $('.element').css('background-image')
if (background.indexOf("blue-sky.jpg") >= 0) {
    document.getElementById("element2").style.backgroundImage = "url(https://images.freeimages.com/images/premium/previews/2272/22721547-omg-face.jpg)";
}
Zarden