You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
602 B
JavaScript
22 lines
602 B
JavaScript
// Clear URL - remove wpforms_form_id
|
|
( function() {
|
|
var loc = window.location,
|
|
query = loc.search;
|
|
|
|
if ( query.indexOf( 'wpforms_form_id=' ) !== -1 ) {
|
|
query = query.replace( /([&?]wpforms_form_id=[0-9]*$|wpforms_form_id=[0-9]*&|[?&]wpforms_form_id=[0-9]*(?=#))/, '' );
|
|
history.replaceState( {}, null, loc.origin + loc.pathname + query );
|
|
}
|
|
}() );
|
|
|
|
( function( $ ) {
|
|
$( function() {
|
|
if ( $( 'div.wpforms-confirmation-scroll' ).length ) {
|
|
$( 'html,body' ).animate(
|
|
{ scrollTop: ( $( 'div.wpforms-confirmation-scroll' ).offset().top ) - 100 },
|
|
1000
|
|
);
|
|
}
|
|
} );
|
|
}( jQuery ) );
|