1

I have a div that has a background image that I don't know its URL and I'm using PHP to get URL from the server and show it on my page using the style attribute. I want to do some stuff when that background image loaded completely.

I already tried this but it doesn't work:

$('<img>').attr('src').on('load', function() {
 // My codes
});

0 Answers0