【发布时间】:2020-11-30 12:10:05
【问题描述】:
我正在为预订表单使用 WordPress 主题集成,但它不适用于 iOS 设备。单击提交按钮时,它只是刷新当前页面。
关于如何修复此错误的任何想法?
我希望将代码添加到预订表格中以正常工作
【问题讨论】:
-
您正在使用任何表单插件?
-
nope 它的主题内置表单
标签: javascript php jquery wordpress html
我正在为预订表单使用 WordPress 主题集成,但它不适用于 iOS 设备。单击提交按钮时,它只是刷新当前页面。
关于如何修复此错误的任何想法?
我希望将代码添加到预订表格中以正常工作
【问题讨论】:
标签: javascript php jquery wordpress html
试试这个代码。
$('.btn-send').on('click', function(e){
setTimeout(function() {
/* with this line, I pretend to disable both buttons in order to
prevent the user click them while the form is submitted */
$('.btn-modal').attr('disabled', "disabled");
/* show the gift image */
$('.waiting').fadeIn('fast');
}, 1);
});
希望它对你有用
【讨论】: