• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account Log out
  • Favorite
  • Project
  • Recent History
Loading...
  • Log in
  • Sign up
kadrians / Testing_for_YONA star
  • Project homeH
  • CodeC
  • IssueI 1
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB 2
  • Files
  • Commit
  • Branches
Testing_for_YONAsourcepublicjavascriptslibjquery.pageslide.js
Download as .zip file
File name
Commit message
Commit date
bin
Yona 1.16.0 Upload
02-04
lib
Yona 1.16.0 Upload
02-04
share/doc/api
Yona 1.16.0 Upload
02-04
source
Source Code Upload
02-04
README.md
Yona 1.16.0 Upload
02-04
File name
Commit message
Commit date
app
Source Code Upload
02-04
conf
Source Code Upload
02-04
docs
Source Code Upload
02-04
lib
Source Code Upload
02-04
project
Source Code Upload
02-04
public
Source Code Upload
02-04
support-script
Source Code Upload
02-04
test
Source Code Upload
02-04
.gitignore
Source Code Upload
02-04
.mailmap
Source Code Upload
02-04
.travis.yml
Source Code Upload
02-04
AUTHORS
Source Code Upload
02-04
LICENSE
Source Code Upload
02-04
NOTICE
Source Code Upload
02-04
README.md
Source Code Upload
02-04
build.sbt
Source Code Upload
02-04
dev.sh
Source Code Upload
02-04
dist.sh
Source Code Upload
02-04
is-alive-bot.sh
Source Code Upload
02-04
minify-js.sh
Source Code Upload
02-04
restart.sh
Source Code Upload
02-04
File name
Commit message
Commit date
bootstrap
Source Code Upload
02-04
help
Source Code Upload
02-04
images
Source Code Upload
02-04
javascripts
Source Code Upload
02-04
stylesheets
Source Code Upload
02-04
compiler.jar
Source Code Upload
02-04
File name
Commit message
Commit date
common
Source Code Upload
02-04
lib
Source Code Upload
02-04
service
Source Code Upload
02-04
template
Source Code Upload
02-04
yona-common.js
Source Code Upload
02-04
yona-layout.js
Source Code Upload
02-04
yona-lib.js
Source Code Upload
02-04
File name
Commit message
Commit date
ace
Source Code Upload
02-04
atjs
Source Code Upload
02-04
autosize
Source Code Upload
02-04
elevator
Source Code Upload
02-04
favico
Source Code Upload
02-04
highlight
Source Code Upload
02-04
jquery
Source Code Upload
02-04
magnific-popup
Source Code Upload
02-04
mentionjs
Source Code Upload
02-04
nprogress
Source Code Upload
02-04
pikaday
Source Code Upload
02-04
select2
Source Code Upload
02-04
tasklist
Source Code Upload
02-04
tippy
Source Code Upload
02-04
videojs
Source Code Upload
02-04
viewerjs
Source Code Upload
02-04
canvas-to-blob.js
Source Code Upload
02-04
clipboard.js
Source Code Upload
02-04
diff.js
Source Code Upload
02-04
filetype.js
Source Code Upload
02-04
humanize.js
Source Code Upload
02-04
jquery.pageslide.js
Source Code Upload
02-04
less-1.3.0.min.js
Source Code Upload
02-04
marked.js
Source Code Upload
02-04
moment-with-langs.min.js
Source Code Upload
02-04
parseuri.js
Source Code Upload
02-04
rgbcolor.js
Source Code Upload
02-04
underscore.js
Source Code Upload
02-04
validate.js
Source Code Upload
02-04
vendor.js
Source Code Upload
02-04
xss.js
Source Code Upload
02-04
Nell 02-04 2600fe6 Source Code Upload UNIX
Raw Open in browser Change history
/* * 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 = $('<div />').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 = $("<iframe allowtransparency='true' />").attr({ src: url, frameborder: 0, hspace: 0 }) .css({ width: "100%", height: "100%" }); $pageslide.html( iframe ); } else { $pageslide.load( url ); } $pageslide.data( 'localEl', false ); } } // Function that controls opening of the pageslide function _start( direction, speed ) { var slideWidth = $pageslide.outerWidth( true ), bodyAnimateIn = {}, slideAnimateIn = {}; // If the slide is open or opening, just ignore the call if( $pageslide.is(':visible') || _sliding ) return; _sliding = true; switch( direction ) { case 'left': $pageslide.css({ left: 'auto', right: '-' + slideWidth + 'px' }); // bodyAnimateIn['margin-left'] = '-=' + slideWidth; slideAnimateIn['right'] = '+=' + slideWidth; break; default: $pageslide.css({ left: '-' + slideWidth + 'px', right: 'auto' }); bodyAnimateIn['margin-left'] = '+=' + slideWidth; slideAnimateIn['left'] = '+=' + slideWidth; break; } // Animate the slide, and attach this slide's settings to the element $body.animate(bodyAnimateIn, speed); $pageslide.show() .animate(slideAnimateIn, speed, function() { _sliding = false; }); } /* * Declaration */ $.fn.pageslide = function(options) { var $elements = this; // On click $elements.on('click.pageslide', function(e) { var $self = $(this), settings = $.extend({ href: $self.attr('href') }, options); // Prevent the default behavior and stop propagation e.preventDefault(); e.stopPropagation(); if ( $pageslide.is(':visible') && $self[0] == _lastCaller ) { // If we clicked the same element twice, toggle closed $.pageslide.close(); } else { // Open $.pageslide( settings ); // Record the last element to trigger pageslide _lastCaller = $self[0]; } }); }; /* * Default settings */ $.fn.pageslide.defaults = { speed: 200, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds) direction: 'right', // Accepts 'left' or 'right' modal: false, // If set to true, you must explicitly close pageslide using $.pageslide.close(); iframe: true, // By default, linked pages are loaded into an iframe. Set this to false if you don't want an iframe. href: null // Override the source of the content. Optional in most cases, but required when opening pageslide programmatically. }; /* * Public methods */ // Open the pageslide $.pageslide = function( options ) { // Extend the settings with those the user has provided var settings = $.extend({}, $.fn.pageslide.defaults, options); // Are we trying to open in different direction? if( $pageslide.is(':visible') && $pageslide.data( 'direction' ) != settings.direction) { $.pageslide.close(function(){ _load( settings.href, settings.iframe ); _start( settings.direction, settings.speed ); }); } else { setTimeout(function () { _load(settings.href, settings.iframe); }, 300); $("#pageslide > iframe").remove(); if( $pageslide.is(':hidden') ) { _start( settings.direction, settings.speed ); } } $pageslide.data( settings ); } // Close the pageslide $.pageslide.close = function( callback ) { var $pageslide = $('#pageslide'), slideWidth = $pageslide.outerWidth( true ), speed = $pageslide.data( 'speed' ), bodyAnimateIn = {}, slideAnimateIn = {} // If the slide isn't open, just ignore the call if( $pageslide.is(':hidden') || _sliding ) return; _sliding = true; switch( $pageslide.data( 'direction' ) ) { case 'left': // bodyAnimateIn['margin-left'] = '+=' + slideWidth; slideAnimateIn['right'] = '-=' + slideWidth; break; default: bodyAnimateIn['margin-left'] = '-=' + slideWidth; slideAnimateIn['left'] = '-=' + slideWidth; break; } $pageslide.animate(slideAnimateIn, speed); $body.animate(bodyAnimateIn, speed, function() { $pageslide.hide(); _sliding = false; if( typeof callback != 'undefined' ) callback(); }); $(".left-menu").show(200); } /* Events */ // Don't let clicks to the pageslide close the window $pageslide.on('click.pageslide', function(e) { e.stopPropagation(); }); // Close the pageslide if the document is clicked or the users presses the ESC key, unless the pageslide is modal $(document).bind('click keyup', function(e) { // If this is a keyup event, let's see if it's an ESC key if( e.type == "keyup" && e.keyCode != 27) return; // Make sure it's visible, and we're not modal if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) { $.pageslide.close(); } }); });

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
login with Google Sign in with Google
Reset password | Sign up