/hscroller.js

A horizontal scrolling single page web template

Primary LanguageJavaScriptMIT LicenseMIT

hscroller.js

This is a simple horizontal scrolling single page web template. It provides a more intuitive user experience when using touch devices while preserving the classical desktop feeling. Feel free to use/fork/share it.

Features

✓ Supports swipe gestures for touch-enabled devices

✓ Handles vertical scrolling in legacy browsers

✓ Hash routing for easy bookmarking/linking

✓ IE7+, Firefox 3.6+, Safari 4+ support

✓ Responsive

✓ MIT permissive license

Usage

To add a new page, simply add a new element:

<li class="page overthrow">
	content here
</li>

The pages are numbered by their position in the DOM. So the first element is page 0, the second is page 1, etc.

To link a page use:

<a href="#page.html" data-page="N">Link</a>

Replace N with an integer >= 0, first page starts at 0.

Replace page.html with a unique name for your page.