!!! %html(xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en') %head %title ScrollIt.js - easy vertical scrolling %script(type='text/javascript' src='jquery-1.10.2.min.js') %script(type='text/javascript' src='../scrollIt.min.js') %link(href='http://fonts.googleapis.com/css?family=Headland+One|Open+Sans:400italic,400,700' rel='stylesheet' type='text/css') %link(rel='stylesheet' href='style.css') %script $(function() { $.scrollIt(); }); %body .nav-container %nav %ul %li %a.active(data-scroll-nav='0') About %li %a(data-scroll-nav='1') Usage %li %a(data-scroll-nav='2') Options %li %a(data-scroll-nav='3') Credit %section(data-scroll-index='0') .content %h1 ScrollIt.js Tweet %h2 About %p ScrollIt.js(scroll•it•dot•js) makes it easy to make scrolling pages like this one or add scrolling functionality to existing pages. Here's a brief blog plost explaining it. %h4 This is why it rocks: %ul.why-list %li Easy to implement: One JS call, just put data- attributes on the DOM %li Lightweight: ~1kb minified %li Active Class: Your navigation is updated automatically %li Configurable: Set the animation easing, duration, callbacks and more %li Keyboard Navigation: Press the up and down keys to move... %section(data-scroll-index='1') .content %h2 Usage %p 1) Include jQuery and scrollIt.js %p 2) Put a data-scroll-index attribute on each section %p 3) Put corresponding data-scroll-nav attributes on each nav element %p 4) For links to sections, put on a data-scroll-goto attribute %p 5) Call scrollIt() %p View the source of this page for an example %section(data-scroll-index='2') .content %h2 Options %p To customize scrollIt.js, simply pass in an options object: (defaults shown) %section(data-scroll-index='3') .content %h2 Credit %p ScrollIt.js was created by @ChrisPolis. %p Feel free to use, share and fork it. It's on Github. %p Enjoy! %p.bottom-link %a(data-scroll-goto='0') Back to top