Skip to content

Latest commit

 

History

History
95 lines (61 loc) · 1.82 KB

README.md

File metadata and controls

95 lines (61 loc) · 1.82 KB

[Attention]

  This repository is not currently maintained, and is kept for historical purpose only. Fork your copy away!

[/Attention]

Thanks everyone for support <3

Scrollyeah 👍

Puts floats in single line.

Getting Started

To make Scrollyeah work on a page:

  1. Link to the newest jQuery, scrollyeah.css & scrollyeah.js.
  2. Add elements to <div class="scrollyeah"></div>.

Basic example:

<script src="jquery.js"></script>
<link  href="scrollyeah.css" rel="stylesheet" />
<script src="scrollyeah.js"></script>

<div class="scrollyeah">
  <div class="float">1</div>
  <div class="with-any-class">2</div>
  <div class="yeah">3</div>
  <!-- ... -->
</div>

Options

Options are passed through the data-optionName attributes:

<div class="scrollyeah" data-shadows="false" data-disableIfFit="true">
  <!-- ... -->
</div>

shadows

Enables shadows.

maxWidth

Inner content max-width in pixels. Increase if your content wider than 999999px.

disableIfFit

Disables dragging if no overflow.

centerIfFit

Centers content if width enough.

triggerScrollyeah

Triggers scrollyeah event on element.

Default options:

{
  maxWidth: 999999,
  shadows: true,
  disableIfFit: true,
  centerIfFit: false,
  triggerScrollyeah: false
}

Examples

  1. Default
  2. Disable if fit
  3. Center if fit
  4. Parallax

Live example

jQuery (1.9+) is required.

License

Copyright © 2012 Artem Polikarpov Licensed under the MIT License.