Skip to content

Stacking scrolling navigation, modern alternative to Slinky.js without any dependency

License

Notifications You must be signed in to change notification settings

matronator/stacky.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stacky.js

Create beautiful scrolling driven navigation lists with stacking headers that remain visible at all times. No dependency required - just pure JavaScript!

Getting Started

npm

npm install stacky.js

Example

A minimal HTML structure for Stacky to work with can look something like this:

<main>
  <nav>
    <section>
      <header class="stacky">First header</header>
      <p>Some content</p>
    </section>
    <section>
      <header class="stacky">Second header</header>
      <ul>
        <li>First item</li>
        <li>Second item</li>
      </ul>
    </section>
    <!-- More sections here -->
  </nav>
</main>

Credits

Original jQuery plugin: Slinky.js