/* * jQuery pageSlide * Version 2.0.1 * https://github.com/tacitknowledge/jquery-pageslide * * * * * Copyright (c) 2011 Scott Robbin (srobbin.com) * Modified by Tacit Knowledge for CommonJS and AMD integration 2015 * Dual licensed under the MIT and GPL licenses. */ (function(factory){ if (typeof define === 'function' && define.amd) { define(function () { return factory; }); } else if (typeof module === 'object' && typeof module.exports === 'object') { exports = factory; } else { factory(jQuery); } })(function($){ // Not inintializing second time if ($.fn.pageslide) { return; } // Convenience vars for accessing elements var $body = $('body'), $pageslide = $('#pageslide'); var _sliding = false, // Mutex to assist closing only once _lastCaller; // Used to keep track of last element to trigger pageslide // If the pageslide element doesn't exist, create it if( $pageslide.length == 0 ) { $pageslide = $('
').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( $pageslide.empty() ).show(); } else { // Load a URL. Into an iframe? if( useIframe ) { var iframe = $("