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

Already on GitHub? Sign in to your account

Load images into a cache object first #23

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

Hey :)

This commit adds a cache Image object with onload event. This makes sure that images are only displayed when ready (loaded) so the placehoder (loader) doesn't disappear and effects don't trigger before the image is ready.

Resolves issue #18

witq commented Mar 10, 2012

I tested it in Safari and it makes the images flash before they fade in.

Edit: I just checked in Chrome and it appears that it works fine, when the images are loaded the first time - they fade in after they are completely loaded. But once they are loaded and you refresh the page, they flash for a fraction of a second, then disappear and then fade in.

One more edit: I'm sorry, it seems the flashing is random and has nothing to do with the images being loaded from browser cache or server.

Owner

sebarmeli commented Oct 11, 2012

Sounds a great idea! Thanks @humancopy

Owner

sebarmeli commented Oct 11, 2012

I will include your code in the next release 1.0. Thanks

@sebarmeli sebarmeli closed this Oct 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment