jquery-headerpersist

1.0.1 • Public • Published

headerPersist

Description

Locks a header to the top of the page only when user is scrolling within it's parent container.

Open example.html for example usage.

Required HTML

<div class="persistMe">
  <h2>Header 1</h2>
  <p>Lorem ipsum dolor sit amet...</p>
</div>

Required JavaScript

$('.persistMe').headerPersist();

Links

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i jquery-headerpersist

      Weekly Downloads

      1

      Version

      1.0.1

      License

      MIT

      Last publish

      Collaborators

      • travishorn