daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. onLeave: function( index, nextIndex, direction ) {
  2.     var rows        = $j( '#oceanwp-fullpage .elementor-section-wrap > .wrap-section' ),
  3.         nextRow     = rows.eq( nextIndex - 1 );
  4.  
  5.     if ( direction == 'down' ) {
  6.         if ( nextRow.children().children( '.elementor-top-section' ).hasClass( 'light' ) ) {
  7.             $j( 'body' ).removeClass( 'ofc-light-nav ofc-dark-nav' ).addClass( 'ofc-light-nav' );
  8.         } else if ( nextRow.children().children( '.elementor-top-section' ).hasClass( 'dark' ) ) {
  9.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' ).addClass( 'ofc-dark-nav' );
  10.         } else {
  11.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' );
  12.         }
  13.     } else if ( direction == 'up' ) {
  14.         if ( nextRow.children().children( '.elementor-top-section' ).hasClass( 'light' ) ) {
  15.             $j( 'body' ).removeClass( 'ofc-light-nav ofc-dark-nav' ).addClass( 'ofc-light-nav' );
  16.         } else if ( nextRow.children().children( '.elementor-top-section' ).hasClass( 'dark' ) ) {
  17.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' ).addClass( 'ofc-dark-nav' );
  18.         } else {
  19.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' );
  20.         }
  21.     }
  22. },
  23. afterLoad: function( anchorLink, index ) {
  24.     if ( $j( this ).hasClass( 'active' ) ) {
  25.         if ( $j( this ).children().children( '.elementor-top-section' ).hasClass( 'light' ) ) {
  26.             $j( 'body' ).removeClass( 'ofc-light-nav ofc-dark-nav' ).addClass( 'ofc-light-nav' );
  27.         } else if ( $j( this ).children().children( '.elementor-top-section' ).hasClass( 'dark' ) ) {
  28.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' ).addClass( 'ofc-dark-nav' );
  29.         } else {
  30.             $j( 'body' ).removeClass( 'ofc-dark-nav ofc-light-nav' );
  31.         }
  32.     }
  33. },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top