I am trying to create a function with fullpage.js that allows me to randomly move to another “article” when the video displayed inside the article is over.
For that I have to use the function “$ .fn.fullpage.moveTo (X, Y);”
X is the number of the section (the first one must begin with 1)
Y is the article number (the first one must start with 0)
Precisely, I would like to randomly choose a section (X), assign it the number that corresponds to it (with 1 as the first) and choose in this section an “article” randomly, depending on the number of articles (with 0 as the first) , and give him the number that corresponds to him (Y)
I managed to create a “random” function, but it just allows me to go to another “section”.
Here is my try on Jsfiddle which allows me to just choose a section starting with 1.