I have a tree-structured database and in my website I am going down the tree as I show their content in \"sections\" and \"slides\" of fullPage.js plugin. The problem is, wh
Thanks, Alvaro! I also want to include my approach in order to remove sections and slides.
To remove the active section at the bottom and go to upper section:
$('#fullpage').on('click', 'button#removeSection', function() {
var section = $('.fp-section.active');
$.fn.fullpage.moveSectionUp();
setTimeout(function(){
section.remove();
}, 700);
});
To remove the last slide and go to the slide on the left:
$('#fullpage').on('click', 'button#removeSlide', function() {
var slide = $('.fp-section.active').find('.slide.active');
$.fn.fullpage.moveSlideLeft();
setTimeout(function(){
slide.remove();
}, 700);
});
700ms is the default animation time. We should wait for the animation time to pass, in order to not to see the section/slide as it is being removed (what we observe as blink).