lookforward
It supports simple page transitions using HistoryAPI
See https://appleple.github.io/lookforward/ for complete docs and demos
Feature
Installation
via npm
npm install lookforward --save
or yarn
yarn add lookforward
Usage
require
const lookforward = ;
lookforward.js
window;
jquery-lookforward.js
;
Open
Option
classNames: LookForward: 'lookforward' LookForwardBody: 'lookforward-body' LookForwardInner: 'lookforward-inner' LookForwardClose: 'lookforward-close' LookForwardCloseBtn: 'lookforward-close-btn' LookForwardHeader: 'lookforward-header' LookForwardFooter: 'lookforward-footer' scrapedArea: 'body' // Area to be scraped useHistoryApi: true // Rewrite URL on page transitions using HistoryAPI
Event
// when the modal is openedlookforward; // when the modal is closedlookforward; // when all modals are closedlookforward;
Tips
If you want to execute JavaScript on each pages, I recommend you specifying scraped area so to exclude common JavaScript such as jQuery and include local JavaScript. The following is the example how
<!-- contents here -->
Download
Github
https://github.com/appleple/lookforward
Contributor
License
Code and documentation copyright 2017 by appleple, Inc. Code released under the MIT License.