Javaid
Javaid

Reputation: 375

Use full page multiple times in different tabs

enter image description here

As you can see I have different tabs. I want to use the full-page method for each group( Each group has its own section slide ) separately. As I can use the full page only once I'm stuck. Can you tell me how to do this?

It's working fine for the first group but not working on the second. I also tried the destroy method mentioned in the documentation of fullpage.js

Upvotes: 0

Views: 162

Answers (1)

Alvaro
Alvaro

Reputation: 41595

You can destory and initialisee fullpage.js every time you need a new instance.

Use the fullpage_api.destory('all') method and then initialise it again.

It should look kind of like this:


function showTab1(){
    fullpage_api.destroy('all');

    // loading HTML for tab1
    loadHTML();

    new fullpage('#fullpage', options);
}

function showTab2(){
    fullpage_api.destroy('all');

    // loading HTML for tab2
    loadHTML();

    new fullpage('#fullpage', options);
}

Upvotes: 1

Related Questions