javascript - 我的提交按钮不起作用

标签 javascript php jquery css

http://investinlisbon.ml/ 所以我在页面顶部有我的小表格(按钮给我回电话!),但我的提交按钮(发送)停止工作

我猜我的函数可能覆盖了我的表单?

JS

$('#cmb-button').toggle(function() {
//this will happen when your mouse moves over the object
$('#cmb-button2').css({
"display": "none"
});
$('#cmb-button3').css({
"display": "inline"
});

}, function() {
//this is what will happen when you take your mouse off the object
$('#1101').css({});
});

PHP

<div id="cmb-button" class="cmb">

<div id="cmb-button2">

<button type="button" id="buttoncontact">
  Call me back!
</button>

</div>

<div id="cmb-button3">
<?php 
 echo do_shortcode( '[contact-form-7        id="1101" title="Call Back PT"]' );
                            ?>
</div>
</div>

最佳答案

导致您的代码中断的问题是您对 .toggle() 的使用自 jQuery v1.8 以来已被弃用,并从 v1.9 正式删除。如果您使用的是较新版本的 jQuery,您可能会因此遇到困难。

弃用:http://api.jquery.com/toggle-event/

:http://api.jquery.com/toggle/

关于javascript - 我的提交按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35656238/

相关文章:

javascript - 为什么这个按钮的 "click"在按钮的某些区域不起作用?

javascript - 没有父级高度的绝对位置

javascript - vue-fullscreen在iframe中不起作用

php - 页脚不会停留下来

php - 在 php 中解析非常大的 XML 文件

PHP 7.2 警告 : "Cannot change session name when session is active"

javascript - 你能在两个 &lt;script src =""> 文件之间自动选择吗?

javascript - 原型(prototype)制作 "arguments"

javascript - 为什么我的 javascript 函数没有被新函数替换?

javascript - 如何使用类名遍历每个元素