Otto
Otto

Reputation: 119

fullPage.js loading issue caused by calling

I'd like to use fullPage.js ( by https://github.com/alvarotrigo/fullPage.js ) inside a div in another directory of my site, but I don't understand where's the issue and How to solve. I've broken my mind over the net with any result :(

Test site: http://simonenicosia.com/fullPage/

I guess the problem is I'm calling an html to another dir ( /projects/timeline.html ) to load content and it doesn't activate:

$('#fullpage').fullpage({
        sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
        scrollingSpeed: 1000
      });

Click on the following image to activate the script there: enter image description here

Upvotes: 1

Views: 281

Answers (1)

Alvaro
Alvaro

Reputation: 41595

You are not showing us enough code so we can only guess. The problem is not in the initialization but on when you call the initialization.

If I click on the image (so the #fullpage div is added) and then in the JS console I add $('#fullpage').fullpage() to initialize fullpage.js, it will work as expected.

So one thing is clear. The problem is when you initialize it.

Upvotes: 1

Related Questions