//———————————————————-
//—— JAVASCRIPT HOOK FUNCTIONS FOR GRAVITY FORMS ——-
//———————————————————-
if ( ! gform ) {
document.addEventListener( ‘gform_main_scripts_loaded’, function() { gform.scriptsLoaded = true; } );
window.addEventListener( ‘DOMContentLoaded’, function() { gform.domLoaded = true; } );
var gform = {
domLoaded: false,
scriptsLoaded: false,
initializeOnLoaded: function( fn ) {
if ( gform.domLoaded && gform.scriptsLoaded ) {
fn();
} else if( ! gform.domLoaded && gform.scriptsLoaded ) {
window.addEventListener( ‘DOMContentLoaded’, fn );
} else {
document.addEventListener( ‘gform_main_scripts_loaded’, fn );
}
},
hooks: { action: {}, filter: {} },
addAction: function( action, callable, priority, tag ) {
gform.addHook( ‘action’, action, callable, priority, tag );
},
addFilter: function( action, callable, priority, tag ) {
gform.addHook( ‘filter’, action, callable, priority, tag );
},
doAction: function( action ) {
gform.doHook( ‘action’, action, arguments );
},
applyFilters: function( action ) {
return gform.doHook( ‘filter’, action, arguments );
},
removeAction: function( action, tag ) {
gform.removeHook( ‘action’, action, tag );
},
removeFilter: function( action, priority, tag ) {
gform.removeHook( ‘filter’, action, priority, tag );
},
addHook: function( hookType, action, callable, priority, tag ) {
if ( undefined == gform.hooks[hookType][action] ) {
gform.hooks[hookType][action] = [];
}
var hooks = gform.hooks[hookType][action];
if ( undefined == tag ) {
tag = action + ‘_’ + hooks.length;
}
if( priority == undefined ){
priority = 10;
}
gform.hooks[hookType][action].push( { tag:tag, callable:callable, priority:priority } );
},
doHook: function( hookType, action, args ) {
// splice args from object into array and remove first index which is the hook name
args = Array.prototype.slice.call(args, 1);
if ( undefined != gform.hooks[hookType][action] ) {
var hooks = gform.hooks[hookType][action], hook;
//sort by priority
hooks.sort(function(a,b){return a[“priority”]-b[“priority”]});
hooks.forEach( function( hookItem ) {
hook = hookItem.callable;
if(typeof hook != ‘function’)
hook = window[hook];
if ( ‘action’ == hookType ) {
hook.apply(null, args);
} else {
args[0] = hook.apply(null, args);
}
} );
}
if ( ‘filter’==hookType ) {
return args[0];
}
},
removeHook: function( hookType, action, priority, tag ) {
if ( undefined != gform.hooks[hookType][action] ) {
var hooks = gform.hooks[hookType][action];
hooks = hooks.filter( function(hook, index, arr) {
var removeHook = (undefined==tag||tag==hook.tag) && (undefined==priority||priority==hook.priority);
return !removeHook;
} );
gform.hooks[hookType][action] = hooks;
}
}
};
}
Nominees for Week 7 Premier PT Player of the Week
/* = 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find(‘#gform_wrapper_10’);var is_confirmation = jQuery(this).contents().find(‘#gform_confirmation_wrapper_10’).length > 0;var is_redirect = contents.indexOf(‘gformRedirect(){‘) >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery(‘html’).css(‘margin-top’), 10) + parseInt(jQuery(‘body’).css(‘margin-top’), 10) + 100;if(is_form){jQuery(‘#gform_wrapper_10’).html(form_content.html());if(form_content.hasClass(‘gform_validation_error’)){jQuery(‘#gform_wrapper_10’).addClass(‘gform_validation_error’);} else {jQuery(‘#gform_wrapper_10’).removeClass(‘gform_validation_error’);}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */ }, 50 );if(window[‘gformInitDatepicker’]) {gformInitDatepicker();}if(window[‘gformInitPriceFields’]) {gformInitPriceFields();}var current_page = jQuery(‘#gform_source_page_number_10’).val();gformInitSpinner( 10, ‘https://delawarelive.com/wp-content/plugins/gravityforms/images/spinner.svg’, false );jQuery(document).trigger(‘gform_page_loaded’, [10, current_page]);window[‘gf_submitting_10’] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find(‘.GF_AJAX_POSTBACK’).html();if(!confirmation_content){confirmation_content = contents;}jQuery(‘#gform_wrapper_10’).replaceWith(confirmation_content);jQuery(document).trigger(‘gform_confirmation_loaded’, [10]);window[‘gf_submitting_10’] = false;wp.a11y.speak(jQuery(‘#gform_confirmation_message_10’).text());}else{jQuery(‘#gform_10’).append(contents);if(window[‘gformRedirect’]) {gformRedirect();}}jQuery(document).trigger(“gform_pre_post_render”, [{ formId: “10”, currentPage: “current_page”, abort: function() { this.preventDefault(); } }]); if (event && event.defaultPrevented) { return; } const gformWrapperDiv = document.getElementById( “gform_wrapper_10” ); if ( gformWrapperDiv ) { const visibilitySpan = document.createElement( “span” ); visibilitySpan.id = “gform_visibility_test_10”; gformWrapperDiv.insertAdjacentElement( “afterend”, visibilitySpan ); } const visibilityTestDiv = document.getElementById( “gform_visibility_test_10” ); let postRenderFired = false; function triggerPostRender() { if ( postRenderFired ) { return; } postRenderFired = true; jQuery( document ).trigger( ‘gform_post_render’, [10, current_page] ); gform.utils.trigger( { event: ‘gform/postRender’, native: false, data: { formId: 10, currentPage: current_page } } ); if ( visibilityTestDiv ) { visibilityTestDiv.parentNode.removeChild( visibilityTestDiv ); } } function debounce( func, wait, immediate ) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if ( !immediate ) func.apply( context, args ); }; var callNow = immediate && !timeout; clearTimeout( timeout ); timeout = setTimeout( later, wait ); if ( callNow ) func.apply( context, args ); }; } const debouncedTriggerPostRender = debounce( function() { triggerPostRender(); }, 200 ); if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) { const observer = new MutationObserver( ( mutations ) => { mutations.forEach( ( mutation ) => { if ( mutation.type === ‘attributes’ && visibilityTestDiv.offsetParent !== null ) { debouncedTriggerPostRender(); observer.disconnect(); } }); }); observer.observe( document.body, { attributes: true, childList: false, subtree: true, attributeFilter: [ ‘style’, ‘class’ ], }); } else { triggerPostRender(); } } );} );
/* ]]> */
Voting ends Wednesday at 3 p.m. Please send questions or comments to Nick Halliday at 302sports@gmail.com.
Source: delawarelive.com…
This Week’s Top Stories Include Cindy Marten appointed Delaware Secretary of EducationChristiana Care house staff…
Eagles fans will hear a familiar voice when they tune in to watch the Birds’…
Longtime star goalkeeper Alyssa Naeher has earned one more honor to finish her outstanding U.S.…
Brian wolf • 3 mins ago Texans had their chances but couldnt get a tight…
Donald Trump’s first inauguration was marked by riots in the streets of Washington and spurred global…
On the afternoon of April 30, 1789, George Washington was sworn in as the first…
This website uses cookies.