Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Trigger an event when pictureFill completed #53
Triggering a custom event at the end of the pictureFill function would have some benefits I think.
Imagine if you have a responsive slideshow with images of different height. Right now, If you add the slideshow on document ready it will have a wrong height since the images are not replaced yet. You could use some imagesLoaded plugin, but again, the images are not replaced when you call it and it will still give a wrong height.
One workaround is to create the slideshow on document load event but it's not the best solution and can have some "long" delay.
Since on my setup I have jQuery I simply added this at the end of the pictureFill function:
Then I was able to simply do something like this and it fixed my issue:
So, is this kind of addition possible? If it is, I could try to make a pull request : )