Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the image background do not trigger the complete event #241

Open
domingosl opened this issue Jul 17, 2016 · 1 comment
Open

Updating the image background do not trigger the complete event #241

domingosl opened this issue Jul 17, 2016 · 1 comment

Comments

@domingosl
Copy link

I have a div were I update the background css property dynamically. Doing this works as intended:

$('#board-wizard .modal-header').css('background-image', 'url(http://i.imgur.com/WRvMldt.gif)');
$('.modal-header').imagesLoaded( { background: true }, function() {
   console.log('#container background image loaded');
});

But if you change again the background the console.log does not get executed:

$('#board-wizard .modal-header').css('background-image', 'url(anotherImage)');

Is there a work around?

@LockonS
Copy link

LockonS commented Oct 28, 2017

Same issue here, it seems the function was triggered before the background image was even loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants