Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

imageloaddone.fluidbox doesn't fire #184

Closed
olafgleba opened this issue Feb 6, 2017 · 3 comments
Closed

imageloaddone.fluidbox doesn't fire #184

olafgleba opened this issue Feb 6, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@olafgleba
Copy link

Hi,

with version 1.4.3 i successfully use folllowing code to show an (animated) indicator (only) while loading the target image source:

// fluidbox v.1.4.3

$('a[rel="fluidbox"]').fluidbox({
  immediateOpen: true})
.on('openstart', function() { 
  $(this).find(".fluidbox-ghost")
  .append("<div class='is-loading-fluidbox'><div class='progress progress--large'></div></div>");
})
.on('imageloaddone', function() { 
    $(this).find('.is-loading-fluidbox').remove();
});

With the last stable version 2.0.4 there are some changes how to call the events and naming, but the custom event imageloaddone.fluidbox seems to be still available though. Unfortunately the imageloaddone.fluidbox doesn't get triggered in the code shown below (while openend.fluidbox does, for example).

// fluidbox v.2.0.4

$('a[rel="fluidbox"]').fluidbox({
  immediateOpen: true})
.on('openstart.fluidbox', function() { 
  $(this).find(".fluidbox__ghost")
  .append("<div class='is-loading-fluidbox'><div class='progress progress--large'></div></div>");
})
.on('imageloaddone.fluidbox', function() { 
    $(this).find('.is-loading-fluidbox').remove();
});

Do i miss something? Any hints are highly appreciated! Thanks.

@terrymun terrymun self-assigned this Feb 6, 2017
@terrymun
Copy link
Owner

terrymun commented Feb 6, 2017

I can see that at some point the imageloaddone event trigger is removed from the source. I will add it back it and do some unit tests, before releasing a fix. Thanks for highlighting it.

@olafgleba
Copy link
Author

Great! Thanks a lot.

@terrymun
Copy link
Owner

This is now fixed in 1beb60c :)

@terrymun terrymun added this to the v2.0.5 milestone Feb 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants