Fullpage.js: Fullpage.js can only be initialized once and you are doing it multiple times!璇烽棶鎬庝箞瑙e喅锛燂紵

Created on 27 May 2017  路  9Comments  路  Source: alvarotrigo/fullPage.js

Description

Link to isolated reproduction with no external CSS / JS

[Ideally in jsfiddle.net or codepen.io, links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]

Steps to reproduce it

  1. [First step]
  2. [Second step]
  3. [and so on...]

Versions

[Browser, operative system, device...]

question

All 9 comments

That means you are initializing fullpage.js multiple times by calling $('#fullpage').fullPage() in multiple cases.
Make sure to only do it once.

hello alvaro what if this is a vue webpack project? I am not calling with jquery anywhere in my vue component files nor in my index.html. The funny thing is I had fullpage working fine, and then it broke recently after messing with trying to publish to gh-pages

I am not calling with jquery anywhere in my vue component files nor in my index.html. T

LOL that's impossible. fullPage.js requires jQuery at the moment :)
Have you checked the Vue-fullpage.js component I created?

untitled1
untitled2

$('#fullpage').fullpage({

});
This is the only thing i have typed other than my personal js in my main.js file but i am getting the same error.

@vishalnarwal99 it is impossible to help you unless you provide a reproduction of the issue in a URL.
Your picture code won't help much.

You might be using some JS framework to create one page sites? That can be one of the reasons.
No matter what the reason is, you are clearly calling that script twice. :)

Try using a console.log just there.

thanks for the help i was calling it in the html>head>script for providing navigation to my sections
sorry for the inconvenience caused

Glad it helped!

That means you are initializing fullpage.js multiple times by calling $('#fullpage').fullPage() in multiple cases.
Make sure to only do it once.

Bro I did it once for all pages. I have 4 pages with your plugin thank you for that your stable plugin helped me. But this problem is not solved. Giving error.
$('.fullpageBlock').fullpage({
autoScrolling: true,
scrollHorizontally: true,
navigation: true,
navigationPosition: 'left',
showActiveTooltip: false,
scrollingSpeed: 1500,
onLeave: function (origin, destination, direction) {
var number = parseInt(destination);

  if (!isNaN(number) && number > 0) {
    $('.bind-btns-to-fullpage span').removeClass('activeFeature');
    $('.bind-btns-to-fullpage span:nth-child(' + number + ')').addClass('activeFeature');
  }
},

});
.fullpageBlock this class i gave my all page wrappers. in 4 page. but the same error.
in my pages structure is similar. One structure only content and informations are different. And all pages i called plugin with one .fullpageBlock class

@Rustamxon if you got that error it is for sure that you are initialicing fullPage.js multiple times :)
You'll have to figure it out yourself as there's no much I can do to help you here. I can only suggest you to see the plenty of different examples where you can see how it works as expected.

If you need further assistance consider acquiring the Organization license from the pricing page to get premium support from us.

Was this page helpful?
0 / 5 - 0 ratings