Skip to content

Instantly share code, notes, and snippets.

@gabrysiak
Created October 29, 2014 19:19
Show Gist options
  • Save gabrysiak/3ee5835cb29715046c4d to your computer and use it in GitHub Desktop.
Save gabrysiak/3ee5835cb29715046c4d to your computer and use it in GitHub Desktop.
Pageslide.js - Refresh form on submit
// Clear interval and open contact form
var openPageslide =function (intervalName){
clearInterval(intervalName);
setTimeout(function(){
$('.pageslide a').trigger('click');
}, 1400);
};
// Pageslide
$(".pageslide a").pageslide({ 'direction': 'top'});
$('#pageslide').on('click', '#gform_submit_button_1', function(e) {
var myInterval = setInterval(function() {
if(window.gf_submitting_1 === false) {
openPageslide(myInterval);
}
}, 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment