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

Is it possible to lazyload slides within a section? #234

Closed
nanc4t opened this issue Feb 11, 2014 · 4 comments
Closed

Is it possible to lazyload slides within a section? #234

nanc4t opened this issue Feb 11, 2014 · 4 comments

Comments

@nanc4t
Copy link

nanc4t commented Feb 11, 2014

Hi, I read through a similar bug but can't figure out lazyload-ing individual slides within a section like you had mentioned in:
#46 (comment)

Advice is much appreciated, and thanks for building this!!

@alvarotrigo
Copy link
Owner

What don´t you understand?
It is explained there how to lazy load backgorund images by using onLeave. if you want to do it with slides just use onSlideLeave or onSlideLoad

@alvarotrigo
Copy link
Owner

Now you can lazy load images, videos and audio elements by using the new functionality introduced in fullpage.js 2.6.6:

https://github.com/alvarotrigo/fullPage.js#lazy-loading

@ghost
Copy link

ghost commented Apr 11, 2016

If my slide HTML looks like this

<div class="slide" id="slide2" data-anchor="slide2">
    <h1>Slide 2</h1>
</div>

and the CSS like this

#slide2{
    background-image: url(../img/img-002.jpg);
    padding:0;
    margin:0;
}

how or better where would I put the data-src attribute?

Or do I have to follow the HTML markup like shown in the demo for lazy loading of slides to be properly working?

<div class="section">
    <div class="slide" id="slide1" data-anchor="slide1">
        <img src="" data-src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/master/examples/imgs/iphone-blue.png" />
    </div>
    <div class="slide" id="slide2" data-anchor="slide2">
        <img src="" data-src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/master/examples/imgs/intro.png" />
    </div>
</div>

Thank you for helping me understand this better.

@honeyamin
Copy link

honeyamin commented Feb 26, 2019

hi there.
1-i use envira gallery plugin in wordpress
2- i make a masonry gallery that will load images when you scroll (lazy load)
issue: when scroll to end of section it doesn't go to next section, i use scrollOverflow:true and there isn't any way that i use "rebuild" because i don't know that when last image loade.
tnx for your help
// sorry for post it in closed if(you read comments;-))

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

3 participants