HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
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,pcntl_unshare,
Upload Files
File: //home/plan4ev/public_html/wp-content/plugins/siteorigin-panels/js/styling.js
/* global _, jQuery */

jQuery( function ( $ ) {
	// Stretch all the full width rows
	const stretchFullWidthRows = function () {
		let fullContainer = $( panelsStyles.fullContainer );
		if ( fullContainer.length === 0 ) {
			fullContainer = $( 'body' );
		}

		const $panelsRow = $( '.siteorigin-panels-stretch.panel-row-style' );
		// Are there any rows to stretch?
		if ( ! $panelsRow.length ) {
			return;
		}

		$panelsRow.each( function () {
			const $$ = $( this );
			const stretchType = $$.data( 'stretch-type' );

			// Reset all the styles associated with row stretching
			$$.css( {
				'margin-left': 0,
				'margin-right': 0,
			} );

			const leftSpace = $$.offset().left - fullContainer.offset().left;
			const rightSpace = fullContainer.outerWidth() - leftSpace - $$.parent().outerWidth();

			$$.css( {
				'margin-left': - leftSpace + 'px',
				'margin-right': - rightSpace + 'px',
			} );

			// If Row Layout is Full Width, apply content container.
			if ( stretchType === 'full' ) {
				$$.css( {
					'padding-left': leftSpace + 'px',
					'padding-right': rightSpace + 'px'
				} );
			}
		} );

		$( window ).trigger( 'panelsStretchRows' );
	}

	if ( panelsStyles.stretchRows ) {
		$( window ).on( 'resize load', stretchFullWidthRows ).trigger( 'resize' );
	}

	if (
		typeof parallaxStyles !== 'undefined' &&
		typeof simpleParallax !== 'undefined'
	) {
		const { 'disable-parallax-mobile': disableParallaxMobile, 'mobile-breakpoint': mobileBreakpoint, delay, scale } = parallaxStyles;

		if (
			! disableParallaxMobile ||
			! window.matchMedia( `(max-width: ${ mobileBreakpoint })` ).matches
		) {
			new simpleParallax( document.querySelectorAll( '[data-siteorigin-parallax], .sow-slider-image-parallax .sow-slider-background-image' ), {
				delay,
				scale: scale < 1.1 ? 1.1 : scale,
			} );
		}
	}

	// This should have been done in the footer, but run it here just incase.
	$( 'body' ).removeClass( 'siteorigin-panels-before-js' );
} );