'
);
}
const hp = jQuery( selector ).find( '.ultimate_h_parallax' );
hp.css( { 'max-width': 'none', position: 'absolute' } );
hp.css( 'min-width', hp.parent().outerWidth() + incr + 'px' );
} );
const resiz = function () {
jQuery( '.vcpb-fs-jquery' ).each( function () {
const selector = jQuery( this );
const sense = selector.data( 'parallax_sense' );
const incr = selector.outerWidth() * ( sense / 100 );
const hp = jQuery( selector ).find( '.ultimate_h_parallax' );
if ( hp.parent().outerHeight() > hp.outerHeight() ) {
hp.css(
'min-height',
hp.parent().outerHeight() + incr + 'px'
);
}
if ( hp.outerHeight() > hp.outerWidth() ) {
hp.css( 'width', 'auto' );
}
jQuery( selector ).css( 'background-image', '' );
} );
};
resiz();
jQuery( window ).resize( function () {
resiz();
} );
jQuery( window ).on( 'load', function () {
jQuery( '.vcpb-fs-jquery' ).each( function () {
let layer_count = jQuery( this ).find( '.ultimate_h_parallax' )
.length;
layer_count = 1 / layer_count;
let lay_opt = new Array();
jQuery( this )
.find( '.ultimate_h_parallax' )
.each( function ( index ) {
lay_opt.push(
"{'xparallax':" +
layer_count * ( index + 1 ) +
" , 'yparallax':" +
layer_count * ( index + 1 ) +
'}'
);
} );
lay_opt = lay_opt.join( ',' );
if (
! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
)
)
var is_mobile = 'false';
else var is_mobile = 'true';
const is_img_parallax_disable_on_mobile = jQuery( this )
.parent()
.data( 'img-parallax-mobile-disable' )
.toString();
if (
is_mobile == 'true' &&
is_img_parallax_disable_on_mobile == 'true'
)
var disable_row_effect = 'true';
else var disable_row_effect = 'false';
if ( disable_row_effect == 'false' )
eval(
"jQuery(this).find('.ultimate_h_parallax').parallax({mouseport: jQuery(this).parent()}," +
lay_opt +
"); var mouse = {x: 0, y: 0}; document.addEventListener('mousemove', function(e){ mouse.x = e.clientX || e.pageX; mouse.y = e.clientY || e.pageY; jQuery(this).parent().trigger({type: 'mousemove', pageX: mouse.x, pageY: mouse.y }); }, true); jQuery(this).parent().trigger({type: 'mouseenter', pageX: 0, pageY: 0}); var x = 1; document.onmousemove = document.onmouseover = function (e) { if(x > 1) return false; mouse.x = e.clientX || e.pageX; mouse.y = e.clientY || e.pageY; x++; if(x == 2) jQuery(this).parent().trigger({type: 'mousemove', pageX: mouse.x, pageY: mouse.y }); }"
);
} );
} );
//}
}
} );