HEX
Server: Apache/2
System: Linux cloudserver.ecpvn.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: monspa (1053)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/monspa/domains/monspa.vn/public_html/wp-content/themes/baoxuan/js/vertical-one-page.js
/**
 * Vertical page navigation
 * A temporary source file providing smooth scrolling navigation to Pages
 */
(function( $ ) {
	var currentPage = location.href;
	var adjustedHeight = $( 'body' ).hasClass( 'admin-bar' ) ? 36 : 0;
	var blogPage = vars.homeUrl + '/' + vars.pageForPosts;
	if ( currentPage.substr( -1 ) === '/' ) {
		currentPage = currentPage.substr( 0, currentPage.length - 1 );
	}

	$( document ).ready(function() {
		// smoothly scroll to an ID
		$( 'a[href*="#"]:not([href="#"])' ).click( function ( e ) {
			var target;
			// if not on root URL
			if ( currentPage === blogPage || vars.isSingle ) {
				target = $(this);
				target = vars.homeUrl + '/' + target[0].hash;
				location = target;
			}
			target = $( this.hash );
			target = target.length ? target : $( '[name=' + this.hash.slice(1) + ']' );
			if ( target.length ) {

				$( 'html, body' ).delay( 100 ).animate({
					scrollTop: target.offset().top - adjustedHeight
				}, 800);
				// put the hash  in  location bar
				window.history.pushState( null, null, e.delegateTarget.href );
				return false;
			}
		});
	});
})( jQuery );