public
Description: jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane.
Homepage: http://code.google.com/p/jquery-pageslide/
Clone URL: git://github.com/srobbin/jquery-pageslide.git
Derek Perez (author)
Fri Jun 19 10:38:30 -0700 2009
commit  d0e4b54803851575e78f2cfd0e211fe2f88841f4
tree    796aee4927c8517082baec038116a5653177b4de
parent  d226aae68da5f73623eb9115dc89a749de22f3a6
name age message
file .gitignore Thu Jun 18 21:21:49 -0700 2009 added a gitignore. [Derek Perez]
file LICENSE Wed Jun 17 23:56:03 -0700 2009 updated license to include little old me. [Derek Perez]
file README.textile Thu Jun 18 22:58:36 -0700 2009 added credits to README. [Derek Perez]
directory demo/ Fri Jun 19 10:38:30 -0700 2009 fixes double side bug reported by charliegriefe... [Derek Perez]
file jquery.pageslide.js Fri Jun 19 10:38:30 -0700 2009 fixes double side bug reported by charliegriefe... [Derek Perez]
file jquery.pageslide.min.js Fri Jun 19 10:38:30 -0700 2009 fixes double side bug reported by charliegriefe... [Derek Perez]
directory lib/ Wed Jun 17 23:53:14 -0700 2009 updated jquery library to latest (1.3.2), added... [Derek Perez]
README.textile

jQuery PageSlide Plugin

A jQuery JavaScript plugin which slides a webpage over to reveal an additional interaction pane.

Features

  • Choose slide direction (left or right)
  • Custom width slides
  • Modal slides
  • unobtrusive
  • Mutiple slide definitions on the same page
  • Fully supported with IE7+, FireFox 2+, Safari 2+
  • Minified version included!

Demo

See the demo/index.html file for a demo of all the options of PageSlide

Requirements

  • jQuery 1.26, jQuery 1.3 recommended (included)

Setup

First, include these lines in your html files HEAD tag:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/javascripts/jquery.pageslide.min.js"></script>

I recommend you use Google to host your jQuery library, but you can use the included one, or download it yourself.

Next, at the bottom of your html file, add the following

<script type="text/javascript">
  $("#my_anchor").pageSlide({width:'350px'});
</script>

If the user has JavaScript enabled, the PageSlide plugin will use AJAX to fetch the href of your anchor tag and inject it into your new slide. If JavaScript is not enabled, your anchor tag will work just as expected, and send your request as usual.

Useful Information

Defining a custom close button in your slide

If you’d like to define a “close” button within your slide, simply add the class “pageslide-close” to any html element.

<a href="javascript:;" class="pageslide-close">Close me!</a>

Making your slide modal

It is possible to make your slide modal, meaning, no click will implicitly cause the slide to close, instead you must explicitly defined an element with a class “pageslide-close” to return to normal.

$("#my_anchor").pageSlide({width:'350px', modal:true});

Slide in from the right

If you would rather have your slide come in from the right, simply define a direction argument.

$("#my_anchor").pageSlide({width:'350px', direction:'right'});

Setup multiple PageSlides on the same page

If you want to have multiple slides on the same page, simply define more!

$("#my_anchor").pageSlide({width:'350px', modal:true});
$("#foobar").pageSlide({width:'150px', direction:'right'});

What are all the different options I can pass into PageSlide?

Here they are:

var settings = $.extend({
width:          "300px", // Accepts fixed widths
duration:       "normal", // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds)
direction:      "left", // default direction is left.
modal:          false, // if true, the only way to close the pageslide is to define an explicit close class. 
start:          function(){}, // event trigger that fires at the start of every open and close.
stop:           function(){}, // event trigger that fires at the end of every open and close.
complete:       function(){} // event trigger that fires once an open or close has completed.
}, options);

I found a BUG! or I want it to do THIS!

Please file a ticket on our github issues tracker, and we will will address them all.

Enjoy!
Scott Robbins and Derek Perez 2009