1.1.7 • Published 4 years ago

fullpage-pagination v1.1.7

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

fullpage-pagination

Example

Install

npm i fullpage-pagination
<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>

<!-- anchor -->
<button data-fullpage-anchor="section-3">button anchor to section 3</button>

<!-- anchor from another page -->
<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 = {
  // some options
};

const fullpage = new Fullpage(page, options);
fullpage.init();

Options

Standart options

{
  transition: 500, // slide transition in miliseconds
  easing: 'ease', // slide transition easing
  navigation: false, // html nav container
  renderNavButton: false, // (i) => { // return button html }
  prevButton: false, // prev button html element
  nextButton: false, // next button html element
  fadeIn: false, // fade effect
  fadeInDuration: 500, // fade effect duration
  customTransition: false, // no effects, just toggle active classnames
  touchevents: false, // pagination on touchevents
  loop: false, // loop option
  toggleClassesFirst: false // if true - toggle sections classes before animation
}

Events

fullpage.afterLoad = () => {
  // some callback
};
fullpage.onExit = (section, resolve) => {
  // some callback
};
fullpage.onEnter = (section, resolve) => {
  // some callback
};
fullpage.onComplete = () => {
  // some callback
};
1.1.7

4 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago