gabrysiak
10/29/2014 - 7:19 PM

Pageslide.js - Refresh form on submit

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);
});