/* * jQuery pageSlide * Version 2.0 * http://srobbin.com/jquery-pageslide/ * * jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane. * * Copyright (c) 2011 Scott Robbin (srobbin.com) * Dual licensed under the MIT and GPL licenses. */ ;(function($){ // Convenience vars for accessing elements var $body_ps = $('body'), $page_slide = $('#pageslide'); var _sliding_ps = false, // Mutex to assist closing only once _lastCaller_ps; // Used to keep track of last element to trigger pageslide // If the pageslide element doesn't exist, create it if( $page_slide.length == 0 ) { $page_slide = $('
').attr( 'id', 'pageslide' ) .css( 'display', 'none' ) .appendTo( $('body') ); } /* * Private methods */ function _load( url, useIframe ) { // Are we loading an element from the page or a URL? if ( url.indexOf("#") === 0 ) { // Load a page element $(url).clone(true).appendTo( $page_slide.empty() ).show(); } else { // Load a URL. Into an iframe? if( useIframe ) { var iframe = $("