Skip to content

Does imagesLOaded not fire when the src attribute of an img element is changed with javascript? #136

@k-risc

Description

@k-risc

I am using imagesloaded.pkgd.min.js and use the following javascript:

    …
$('#payable-preview a .overlay').show();
$('#payable-preview a img')
    .attr('src', …);
$('#payable-preview a img').imagesLoaded()
    .always(function() {
        $('#payable-preview a .overlay').hide();
    });

But the function defined in "always()" is triggered immediately each time this code is executed. Thus the overlay is never visible because it gets hidden right after it was shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions