node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »

pretty-scroll

Pretty Scroll

A library to make an element follow you as you scroll

Features

Installation

via npm

npm install pretty-scroll --save

or yarn

yarn add pretty-scroll

Basic

<div class="js-container">
  <div class="main">
  </div>
  <div class="sub">
    <div class="js-pretty-scroll">
      <!-- contents here -->
    </div>
  </div>
</div>
new PrettyScroll('.js-pretty-scroll',{
  container: '.js-container',
});