This repository has been archived by the owner. It is now read-only.
Browse files

Made the menu plugin more sophisticated and added docu

  • Loading branch information...
Alexander Prinzhorn
Alexander Prinzhorn committed Feb 20, 2013
1 parent bd0088c commit e2b054687b0c924a76db7414c4c9464d233553e8
Showing with 205 additions and 31 deletions.
  1. +21 −0
  2. +1 −1 dist/
  3. +1 −0 examples/
  4. +140 −0 examples/
  5. +42 −30 src/plugins/
@@ -179,6 +179,27 @@ Here's an infographic for better understanding of anchors (click to open PDF):
**Important**: All those values will be calculated up-front and transformed to `absolute` mode. So if either the element's box height changes (height, padding, border) or the elements position within the document, you probably need to call `refresh()` (see documentation in JavaScript section below). **Window resizing is handled by skrollr.**
Hash navigation
In case you want to use hash links, e.g. `<href="#section-about">About</a>` you need to know the following:
* If you animate `top`, `margin-top` or anything that moves the element up/down, the browser won't be able to jump to the correct position and you may end up somewhere else
* If you're using skrollr on mobile they won't work at all, because we're not using native scrolling there
**But** we've got you covered. Download the `dist/` file and include it right after the `skrollr.min.js` file. Then you need to call `` passing the skrollr instance as first parameter and optionally some options. Here's a full example.
var s = skrollr.init(/*other stuff*/);
//The options (second parameter) are all optional. The values shown are the default values., {
animate: true, //skrollr will smoothly animate to the new position using `animateTo`.
duration: 500, //How long the animation should take in ms.
easing: 'sqrt' //The easing function to use.
Working with constants

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -6,6 +6,7 @@ Showcasing the awesomeness of skrollr.
* [The "main" example](
* [Demonstrating different anchors](
* [Demonstrating data-anchor-target](
* [ plugin](
* [Drawing a SVG path](
* [Creating a fixed nav](
* [Snapping](
Oops, something went wrong.

0 comments on commit e2b0546

Please sign in to comment.