Example
Install
npm i fullpage-pagination -D
<div class="fullpage">
<div class="fullpage__inner js-fullpage">
<div class="fullpage__section" data-fullpage-id="section-1">section-1</div>
<div class="fullpage__section" data-fullpage-id="section-2">section-2</div>
<div class="fullpage__section" data-fullpage-id="section-3">section-3</div>
<div class="fullpage__section" data-fullpage-id="section-4">section-4</div>
<div class="fullpage__section" data-fullpage-id="section-5">section-5</div>
</div>
</div>
<button data-fullpage-anchor="section-3">button anchor to section 3</button>
<a href="#section-3">link anchor to section 3 from another page</a>
import { Fullpage, addTouchEvents } from 'fullpage-pagination';
addTouchEvents();
const page = document.querySelector('.js-fullpage');
const options = {
};
const fullpage = new Fullpage(page, options);
fullpage.init();
Options
Standart options
{
transition: 500,
easing: 'ease',
navigation: false,
renderNavButton: false,
prevButton: false,
nextButton: false,
fadeIn: false,
fadeInDuration: 500,
customTransition: false,
touchevents: false,
loop: false
}
Events
fullpage.afterLoad = () => {
};
fullpage.onExit = (section, resolve) => {
};
fullpage.onEnter = (section, resolve) => {
};
fullpage.onComplete = () => {
};