jquery.pageslide.js
// Function that controls opening of the pageslide
Function that controls opening of the pageslide
Function that controls opening of the pageslide
function _start( direction, speed ) {
        var slideWidth = $pageslide.outerWidth( true ),
            bodyAnimateIn = {},
            slideAnimateIn = {};
        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;
        }
        $body.animate(bodyAnimateIn, speed);
        $pageslide.show()
                  .animate(slideAnimateIn, speed, function() {
                      _sliding = false;
                  });
        $body.addClass('menuOpen');
    }
function _start ( direction , speed ) { var slideWidth = $pageslide . outerWidth ( true ) , bodyAnimateIn = { } , slideAnimateIn = { } ; 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 ; } $body . animate ( bodyAnimateIn , speed ) ; $pageslide . show ( ) . animate ( slideAnimateIn , speed , function ( ) { _sliding = false ; } ) ; $body . addClass ( 'menuOpen' ) ; }
Function that controls opening of the pageslide
Function that controls opening of the pageslide
// If the slide is open or opening, just ignore the call // Animate the slide, and attach this slide's settings to the element