Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fullpage-pagination

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fullpage-pagination

JS plugin for making fullpage pagination

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

fullpage-pagination

Example

  • Codesandbox

Install

npm i fullpage-pagination -D
<div class="fullpage">
  <div class="fullpage__inner js-fullpage">
    <div class="fullpage__section" id="section-1">section-1</div>
    <div class="fullpage__section" id="section-2">section-2</div>
    <div class="fullpage__section" id="section-3">section-3</div>
    <div class="fullpage__section" id="section-4">section-4</div>
    <div class="fullpage__section" id="section-5">section-5</div>
  </div>

  <div class="fullpage__nav js-fullpage-nav"></div>

  <div class="fullpage__btns">
    <button class="" data-anchor="#section-1">to section-1</button>
    <button class="" data-anchor="#section-5">to section-5</button>
    <button class="js-prev">prev</button>
    <button class="js-next">next</button>
  </div>    
</div>
import { Fullpage, addFpTouchEvents } from 'fullpage-pagination';
addFpTouchEvents();

const page = document.querySelector('.js-fullpage');
const nav = document.querySelector('.js-fullpage-nav');
const prev = document.querySelector('.js-prev');
const next = document.querySelector('.js-next');

const fullpage = new Fullpage(page, {
  easing: 'ease-out',
  touchevents: true,
  navigation: nav,
  fadeIn: false,
  fadeInDuration: 1000,
  renderNavButton: (i) => {
    return '0' + (i + 1);
  },
  prevButton: prev,
  nextButton: next
});
fullpage.onExit = (section, resolve) => {
  console.log('EXIT animation is hapening');
  setTimeout(() => {
    console.log('EXIT animaton has finished in this section', section);
    resolve();
  }, 0);
};
fullpage.onEnter = (section) => {
  console.log('ENTER animation has started in this section', section);
};
fullpage.init();

Options

Standart options

{
  delay: 1400,
  transition: 500,
  easing: 'ease',
  navigation: false,
  renderNavButton: false,
  prevButton: false,
  nextButton: false,
  fadeIn: false,
  fadeInDuration: 500,
  customTransition: false,
  touchevents: false,
  loop: false
}

Events

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

Keywords

FAQs

Package last updated on 21 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc