and edited the script below in glass.php to this:
<script>
jQuery('.subscribe-btn').on('click', function () {
subscribe();
});
jQuery('#cs_email, #cs_name').on('keypress', function (e) {
if (e.which == 13) {
subscribe();
}
});
function subscribe() {
jQuery.ajax({
url: '<?php echo admin_url('admin-ajax.php'); ?>',
data: {action: 'subscribe_email', cs_email: jQuery("#cs_email").val(), cs_name: jQuery("#cs_name").val()},
dataType: 'json',
success: function (data) {
if (data['error']) {
jQuery('.error-msg #error-msg-text').html(data['message']);
jQuery('.error-msg').removeClass('hidden');
jQuery('.error-msg').addClass('animated fadeIn');
function hideMsg() {
jQuery('.error-msg').addClass('fadeOut');
}
setTimeout(hideMsg, 4000);
function showMsg() {
jQuery('.error-msg').addClass('hidden');
jQuery('.error-msg').removeClass('animated fadeIn fadeOut');
}
setTimeout(showMsg, 4500);
}
else {
jQuery('.subscribe').addClass('animated fadeOutDown');
jQuery('.thankyou').removeClass('hidden');
jQuery('.thankyou').addClass('animated fadeIn');
}
}
});
}
</script>
-
This reply was modified 7 years, 9 months ago by
dennyspirit.
-
This reply was modified 7 years, 9 months ago by
dennyspirit.
-
This reply was modified 7 years, 9 months ago by
dennyspirit.