ShiftPanes.js – Shiftable content panes

My second JavaScript library in as many days! This new one is called ShiftPanes (like my original names huh?!). Basically, it allows you to declare a container that will hold “pageable” blocks of content within it. It is, again, pretty basic and no frills.

Just declare a container with any class you want, and inside declare multiple containers each with the same (different from the container) class that will act as “panes” (or pages). Then simply include ShiftPanes.js and call it in your $().ready() to initialize (passing the selector for the container, selector for the panes, and optional delay and easing). Don’t forget to include links with a class of “shift” and a rel of “next” or “previous” in order to actually interact with the panes.

Here’s the github:
Here’s a sample page:

     ShiftPanes('.container', '.pane', 800, 'swing');
<div class="container">
     <div class="pane">
          <p><b>Pane #1:</b></p>
     <div class="pane">
          <p><b>Pane #2:</b></p>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s