| Server IP : 60.247.133.247 / Your IP : 216.73.217.108 Web Server : Apache System : Linux ebs-119054 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 User : goodwill ( 65985) PHP Version : 8.2.20 Disable Function : link,symlink,passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server,pcntl_fork,pcntl_rfork MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/wwwroot/goodwill/wwwroot/wp-content/plugins/Ultimate_VC_Addons/assets/js/ |
Upload File : |
( function ( $ ) {
$( document ).ready( function () {
$( document ).on(
'mouseenter',
'.ultimate-call-to-action',
function () {
$( this ).addClass( 'ultimate-call-to-action-hover' );
const hover = $( this ).data( 'background-hover' );
$( this ).css( { 'background-color': hover } );
}
);
$( document ).on(
'mouseleave',
'.ultimate-call-to-action',
function () {
$( this ).removeClass( 'ultimate-call-to-action-hover' );
const background = $( this ).data( 'background' );
$( this ).css( { 'background-color': background } );
}
);
resize_call_to_action();
$( window ).resize( function () {
resize_call_to_action();
} );
} );
function resize_call_to_action() {
$( '.ultimate-call-to-action' ).each( function ( i, element ) {
const override = $( element ).data( 'override' );
if ( override != 0 ) {
$( element ).css( { 'margin-left': 0 } );
let is_relative = 'true';
if ( $( element ).parents( '.wpb_row' ).length > 0 )
var ancenstor = $( element ).parents( '.wpb_row' );
else if ( $( element ).parents( '.wpb_column' ).length > 0 )
var ancenstor = $( element ).parents( '.wpb_column' );
else var ancenstor = $( element ).parent();
const parent = ancenstor;
if ( override == 'full' ) {
ancenstor = $( 'body' );
is_relative = 'false';
}
if ( override == 'ex-full' ) {
ancenstor = $( 'html' );
is_relative = 'false';
}
if ( ! isNaN( override ) ) {
for ( var i = 1; i <= override; i++ ) {
if ( ancenstor.prop( 'tagName' ) != 'HTML' ) {
ancenstor = ancenstor.parent();
} else {
break;
}
}
}
const w = ancenstor.outerWidth();
const element_left = $( element ).offset().left;
const element_left_pos = $( element ).position().left;
const holder_left = ancenstor.offset().left;
const holder_left_pos = ancenstor.position().left;
let calculate_left = holder_left - element_left;
if ( override != 'full' && override != 'ex-full' ) {
calculate_left = holder_left - holder_left_pos;
}
$( element ).css( { width: w, 'margin-left': calculate_left } );
}
} );
}
} )( jQuery );