Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/walla3t.corals.io/wp-content/themes/apper/assets/js/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/walla3t.corals.io/wp-content/themes/apper/assets/js/core/scrollEffect.js
var $j 		= jQuery.noConflict(),
	$window = $j( window );

$j( document ).on( 'ready', function() {
	"use strict";
	// Scroll effect
	acmthemesScrollEffect();
} );

/* ==============================================
SCROLL EFFECT
============================================== */
function acmthemesScrollEffect() {
	"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        	= acmthemesGetAdminbarHeight(),
					$topbarHeight        	= acmthemesGetTopbarHeight(),
					$stickyHeaderHeight    	= acmthemesGetStickyHeaderHeight(),
					$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 acmthemesGetAdminbarHeight() {
	"use strict"

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

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

	return $offset;
}

// Top bar height
function acmthemesGetTopbarHeight() {
	"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 acmthemesGetStickyHeaderHeight() {
	"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;
}

Spamworldpro Mini