I have the following code:
<div class="chatUsers" name="chatUsers" id="1">
<div class="chatImageUser" style="background: url('https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg/revision/latest?cb=20170927034529');"></div>
<div class="chatNomeUser">Luke Skywalker</div>
<div class="chatStatusUser">
<div class="chatStatusUserBall"></div>
<div class="chatStatusUserMessage">Online</div>
</div>
</div>
How could I do to catch the value of background: url('')
of the element that has id=1
?
I tried the following, but it did not work:
var urlFoto = $("#1 > .chatImageUser").css('backgroundUrl');