New 'refresh' public method for lazy-loading images #79

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

nlegg commented Apr 14, 2011

Added 'refresh' public method. This allows using code to refresh Colorbox's image pool while Colorbox is still open. The goal is to facilitate a lazy-loaded web page where images are injected into the DOM dynamically.

Added 'refresh' public method. This allows using code to refresh Colo…
…rbox's image pool while Colorbox is still open. The goal is to facilitate a lazy-loaded web page where images are injected into the DOM dynamically.

I opened issue #112, in hopes of getting this merged.

Owner

jackmoore commented Oct 7, 2011

Thanks for the pull request, and sorry for not addressing it sooner. I like the idea of it, and have thought about using a live NodeList to keep track of colorbox assigned elements, rather than using static list. However, this would end up being a lot of unnecessary processing for the vast majority of users because each time each element in the list will have to have it's colorbox settings object accessed to retrieve the value of rel which may be a function that has to be executed. I would like to implement this in an efficient way. I finally have finally cleared a lot off my plate and promise to look into this further in the week to come.

Owner

jackmoore commented Oct 7, 2011

Or if it can't be efficient, I'll make it an optional property.

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