github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

marcoow / glider

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 10
    • 5
  • Source
  • Commits
  • Network (5)
  • Issues (0)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (1)
    • v1.1
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Javascript Glider control based on script.aculo.us — Read more

  cancel

http://simplabs.com/#projects

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

updated copyright notice 
marcoow (author)
Sat Jan 23 07:07:08 -0800 2010
commit  977a520c27a00bfa7c500ece8d20c1ebb1769329
tree    192899b450cc74dbeb24bc05486f26e3a351cb68
parent  737c1ed3d4c05dba500a94a243d42a0c380c2dea
glider /
name age
history
message
file .DS_Store Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
file .gitignore Mon Aug 11 09:21:54 -0700 2008 removed .DS_STORE [marcoow]
file HISTORY.rdoc Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
file MIT-LICENSE Mon Aug 11 09:17:48 -0700 2008 added src. libs and samples; wrote README [marcoow]
file README.rdoc Sat Jan 23 07:07:08 -0800 2010 updated copyright notice [marcoow]
file Rakefile Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
directory dist/ Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
directory examples/ Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
directory lib/ Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
directory src/ Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
directory test/ Thu Apr 30 01:43:55 -0700 2009 updating to v1.1 [marcoow]
README.rdoc

Glider

Glider is a Javascript glider control, based on script.aculo.us. It lets content glide in and out of a surrounding div in either horizontal or vertical direction.

Usage

Just include glider.js in your page and initialize the glider with

  glider = new Glider($('glider'));

You can also specify the direction and parameters for the animation as well as a callback that will be invoked when the glider glides:

  glider = new Glider($('glider', { direction: 'x', transition: Effect.Transitions.sinoidal, duration: .6 }, myCallBackFunction));

The glider’s direction defaults to horizontal (x). Additionally to the Glider class, there is the GliderLink class. Just instantiate a new GliderLink for all links on the page that are supposed to trigger the glider to show a section, e.g.:

  $$('a[href^="#"]').each(function(link) {
    link = new GliderLink(link, glider);
  });

Setup of the HTML required for the glider to work is pretty straight forward. You need a surrounding div, a div that marks the list of sections and one div for each section:

  <div id="glider">
    <div class="sections">
      <div id="section1" class="section">
        section1
      </div>
      <div id="section2" class="section">
        section2
      </div>
      <div id="section3" class="section">
        section3
      </div>
    </div>
  </div>

The ids of these sections have to correspond to the GliderLinks’ hrefs, e.g. a link with href="#section1" triggers the glider to glide div#section1 into view.

Glider will also resize the surrounding container to match the current section’s width or height respectively. To disable that scaling, simply specify a fixed width and/or height for all sections.

For guidance on the required CSS, see the examples

TODOs/ future plans

At the moment there are neither TODOs nor future plans. If you want ot suggest any, do so at github.com/marcoow/glider/issues.

Author

Copyright © 2008-2010 Marco Otte-Witte (simplabs.com), released under the MIT license

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server