简体   繁体   中英

Use full page multiple times in different tabs

在此处输入图像描述

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

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);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM