Skip to content

Commit

Permalink
Full update
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Feb 18, 2015
1 parent 1f9aa93 commit 7cd2fe0
Show file tree
Hide file tree
Showing 7 changed files with 533 additions and 636 deletions.
84 changes: 19 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,37 @@
skrollr-decks
=============
#skrollr-decks

[skrollr](https://github.com/Prinzhorn/skrollr) plugin for fullpage presentation decks

#Installation
##Installation

First of all: look at the example
http://trysound.github.io/skrollr-decks/

Download the `dist/skrollr.decks.min.js` file and include it right after the `skrollr.min.js` file. Then you need to add 'skrollr-decks-init' class to any element on your page and 'skrollr-deck' class on every sections.

Skrollr-decks will set `min-height` of each segment to the height of window. It will also autoresize with the window resizing.

If the height of segment is more than window height then the segement will scroll through before triggering the next segment.

#Usage

##Navigation

skrollr-decks can either generate nagivation or use existing navigation.

Just add this HTML to your page:

```html
<nav class="skrollr-decks-nav">
<ul>
<li>Deck #1</li>
<li>Deck #2</li>
<li>Deck #3</li>
<li>Deck #4</li>
<li>Deck #5</li>
<li>Deck #6</li>
</ul>
</nav>
```
bower i skrollr-decks
```

##Custom Decks

If you wank create custom decks call this method

###skrollr.decks.init(options)

####options.segments

Type: `String`; Default: `'.skrollr-deck'`

classname of segments

####options.nav

Type: `String`; Default: `'.skrollr-decks-nav'`

classname of navigation

####options.gotoDuration

Type: `Integer`; Default: `600`

scrolling duration on nav link click

####options.deckDuration
Add 'skrollr-decks-init' class to `<body>` and 'skrollr-deck' class to every section.

Type: `Integer`; Default: `300`

auto scrolling duration to next or previous deck
##API

####options.deckDelay
###skrollr.decks.init(options)

Type: `Integer`; Default: `200`
- `options.decks` (.skrollr-deck) - decks classname
- `offset` (15) - offset in percents to deck since which will autoscroll
- `duration`(600) - scrolling duration
- `easing`(quaratic) - scrolling easing, [more](https://github.com/Prinzhorn/skrollr#easing)
- `delay`(500) - delay before scroll
- `autoscroll`(true)

delay for mouse scrolling
###skrollr.decks.refresh()

####options.autoScroll
Recalc height of all decks. Need to update when content added

Type: `Boolean`; Default: `true`
###skrollr.decks.animateTo(anchor, noAnimation)

enable auto scroll on next or previous deck detection
- `anchor` - `#id` of deck, `up` or `down`
- `noAnimation` - prevents animation

#License
##License

[The MIT License (MIT)](LICENSE)

Expand Down
Loading

0 comments on commit 7cd2fe0

Please sign in to comment.