Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically lazy-loading content? #47

Closed
indrek-k opened this issue Mar 26, 2014 · 3 comments
Closed

Programmatically lazy-loading content? #47

indrek-k opened this issue Mar 26, 2014 · 3 comments

Comments

@indrek-k
Copy link

I have a page with a large number of galleries. When the user clicks on a gallery thumbnail, a lightbox with that gallery's images is opened. I'd like to be able to lazy load the gallery contents, but not before the lightbox is opened. Is there a way to do this?

@ryanve
Copy link
Owner

ryanve commented Mar 27, 2014

Try deferring the call to Response.create until then (and not using body[data-responsejs] because that calls it automatically). Or try a pure CSS lightbox. If using a JavaScript lightbox, you may be better off just calculating the dimensions with Response or verge and then use .setAttribute to set the [src].

@indrek-k
Copy link
Author

Looks like I'll just use verge and set the src attributes myself. Thanks!

@ryanve
Copy link
Owner

ryanve commented Mar 27, 2014

Sure thing—go for it!

verge has been easier to maintain because it's smaller and more focused, hence #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants