| Server IP : 38.190.208.107 / Your IP : 216.73.217.46 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.3/wp-content/plugins/Ultimate_VC_Addons/assets/js/ |
Upload File : |
( function ( $, window, undefined ) {
jQuery( window ).on( 'load', function ( a ) {
contentBoxInit();
} );
jQuery( window ).resize( function ( a ) {
contentBoxInit();
} );
jQuery( document ).ready( function ( a ) {
contentBoxInit();
} );
// Content Box - Initialize
function contentBoxInit() {
$( '.ult-content-box' ).each( function ( index, el ) {
const normal_bg_color = $( el ).css( 'background-color' ) || '';
const normal_border_color =
$( el ).data( 'border_color' ) || 'transparent';
const normal_box_shadow = $( el ).css( 'box-shadow' ) || '';
const hover_bg_color =
$( el ).data( 'hover_bg_color' ) ||
$( el ).css( 'background-color' );
const hover_border_color =
$( el ).data( 'hover_border_color' ) || 'transparent';
const hover_box_shadow =
$( el ).data( 'hover_box_shadow' ) ||
$( el ).css( 'box-shadow' );
$( el ).on(
'mouseenter',
function () {
$( el ).css( 'background-color', hover_bg_color );
$( el ).css( 'border-color', hover_border_color );
$( el ).css( 'box-shadow', hover_box_shadow );
}
).on(
'mouseleave',
function () {
$( el ).css( 'background-color', normal_bg_color );
$( el ).css( 'border-color', normal_border_color );
$( el ).css( 'box-shadow', normal_box_shadow );
}
);
// Margins - Responsive
let rm_o = {};
const rm = $( el ).data( 'responsive_margins' );
if ( typeof rm !== 'undefined' && rm != null ) {
rm_o = getMargins( rm );
}
// Margins - Normal
let nm_o = {};
const nm = $( el ).data( 'normal_margins' );
if ( typeof nm !== 'undefined' && nm != null ) {
nm_o = getMargins( nm );
} else {
nm_o = getCssMargins( el );
}
const WW = $( window ).width() || '';
if ( WW != '' ) {
if ( WW >= 768 ) {
//console.log('TRUE >= 768');
applyMargins( nm_o, el );
} else {
//console.log('FALSE not >= 768');
applyMargins( rm_o, el );
}
}
} );
}
// create an object
function getCssMargins( el ) {
const tmOb = {};
tmOb[ 'margin-left' ] = trimPx( $( el ).css( 'margin-left' ) );
tmOb[ 'margin-right' ] = trimPx( $( el ).css( 'margin-right' ) );
tmOb[ 'margin-top' ] = trimPx( $( el ).css( 'margin-top' ) );
tmOb[ 'margin-bottom' ] = trimPx( $( el ).css( 'margin-bottom' ) );
// Create normal margins
let bs = '';
$.each( tmOb, function ( index, val ) {
if ( typeof val !== 'undefined' && val != null ) {
bs += index + ':' + val + 'px;';
}
} );
$( el ).attr( 'data-normal_margins', bs );
return tmOb;
}
// Trim 'px' from margin val
function trimPx( l ) {
let sp;
if ( typeof l !== 'undefined' && l != null ) {
sp = l.split( 'px' );
sp = parseInt( sp[ 0 ] );
}
return sp;
}
// Get margins from - DATA ATTRIBUTE
// @return object
function getMargins( mo ) {
const tmOj = {};
const b = mo.split( ';' );
if ( typeof b !== 'undefined' && b != null ) {
$.each( b, function ( index, val ) {
if ( typeof val !== 'undefined' && val != null ) {
const nm = val.split( ':' );
if (
typeof nm[ 0 ] !== 'undefined' &&
nm[ 0 ] != null &&
typeof nm[ 1 ] !== 'undefined' &&
nm[ 1 ] != null
) {
switch ( nm[ 0 ] ) {
case 'margin':
tmOj.margin = nm[ 1 ];
break;
case 'margin-left':
tmOj[ 'margin-left' ] = nm[ 1 ];
break;
case 'margin-right':
tmOj[ 'margin-right' ] = nm[ 1 ];
break;
case 'margin-top':
tmOj[ 'margin-top' ] = nm[ 1 ];
break;
case 'margin-bottom':
tmOj[ 'margin-bottom' ] = nm[ 1 ];
break;
}
}
}
} );
}
return tmOj;
}
// Apply css margins from object
// @return null
function applyMargins( ob, el ) {
if ( ! $.isEmptyObject( ob ) ) {
$.each( ob, function ( index, val ) {
if ( typeof val !== 'undefined' && val != null ) {
$( el ).css( index, val );
}
} );
}
}
} )( jQuery, window );