HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/ielts-store/wp-content/themes/oceanwp/assets/js/core/scrollEffect.js
var $j 		= jQuery.noConflict(),
	$window = $j( window );

$j( document ).ready( function() {
	"use strict";
	// Scroll effect
	oceanwpScrollEffect();
} );

/* ==============================================
SCROLL EFFECT
============================================== */
function oceanwpScrollEffect() {
	"use strict"

	if ( ! $j( 'body' ).hasClass( 'single-product' )
		&& ! $j( 'body' ).hasClass( 'no-local-scroll' ) ) {

	    $j( 'a.local[href*="#"]:not([href="#"]), .local a[href*="#"]:not([href="#"]), a.menu-link[href*="#"]:not([href="#"]), a.sidr-class-menu-link[href*="#"]:not([href="#"])' ).on( 'click', function() {

	    	if ( ! $j( this ).hasClass( 'omw-open-modal' )
	        	&& ! $j( this ).parent().hasClass( 'omw-open-modal' )
	        	&& ! $j( this ).parent().parent().parent().hasClass( 'omw-open-modal' )
	        	&& ! $j( this ).parent().hasClass( 'opl-link' ) ) {

	        	var $href     				= $j( this ).attr( 'href' ),
				    $hrefHash 				= $href.substr( $href.indexOf( '#' ) ).slice( 1 ),
				    $target   				= $j( '#' + $hrefHash ),
					$adminbarHeight        	= oceanwpGetAdminbarHeight(),
					$topbarHeight        	= oceanwpGetTopbarHeight(),
					$stickyHeaderHeight    	= oceanwpGetStickyHeaderHeight(),
					$offset    				= $adminbarHeight + $topbarHeight + $stickyHeaderHeight,
				    $scrollPosition;

				if ( $target.length && '' !== $hrefHash ) {
					$scrollPosition     	= $target.offset().top - $offset;

	                $j( 'html, body' ).stop().animate( {
						 scrollTop: Math.round( $scrollPosition )
					}, 1000 );

					return false;

	            }

	        }

	    } );

	}

}

// Admin bar height
function oceanwpGetAdminbarHeight() {
	"use strict"

	var $offset 		= 0,
	    $adminBar 		= $j( '#wpadminbar' );

	if ( $adminBar.length ) {
		$offset = $adminBar.outerHeight();
	}

	return $offset;
}

// Top bar height
function oceanwpGetTopbarHeight() {
	"use strict"

	var $offset 		= 0,
	    $stickyTopBar 	= $j( '#top-bar-wrap' );

	if ( $stickyTopBar.hasClass( 'top-bar-sticky' )
		&& $stickyTopBar.length ) {
		$offset = $stickyTopBar.outerHeight();
	}

	return $offset;
}

// Header height
function oceanwpGetStickyHeaderHeight() {
	"use strict"

	var $offset 		= 0,
	    $stickyHeader 	= $j( '#site-header' );

	if ( ! $stickyHeader.length ) {
		return;
	}

	if ( $stickyHeader.hasClass( 'fixed-scroll' ) ) {
		$offset = $stickyHeader.data( 'height' );
	}

	if ( $window.width() <= 960
		&& ! $stickyHeader.hasClass( 'has-sticky-mobile' ) ) {
		$offset = $offset;
	}

	if ( $stickyHeader.hasClass( 'medium-header' ) ) {
		if ( $j( '#site-header .bottom-header-wrap' ).hasClass( 'fixed-scroll' ) ) {
			$offset = $j( '#site-header .bottom-header-wrap' ).outerHeight();
		} else {
			$offset = $j( '.is-sticky #site-header-inner' ).outerHeight();
		}
	}

	if ( $stickyHeader.hasClass( 'vertical-header' ) ) {
		$offset = $offset;
	}

	return $offset;
}