|
|
|
@ -102,31 +102,31 @@ $(function() { |
|
|
|
$item.attr("data-expanded", !isExpanded); |
|
|
|
$(this).attr("aria-expanded", !isExpanded); |
|
|
|
}); |
|
|
|
$(".section-contact-form").on("submit", function(e) { |
|
|
|
e.preventDefault(); |
|
|
|
const $form = $(this); |
|
|
|
const $name = $form.find("[name=\"name\"]"); |
|
|
|
const $phone = $form.find("[name=\"phone\"]"); |
|
|
|
const name = $.trim($name.val()); |
|
|
|
const phone = $.trim($phone.val()); |
|
|
|
const agreed = $form.find("[name=\"agree\"]").is(":checked"); |
|
|
|
if (!name) { |
|
|
|
alert("请输入姓名"); |
|
|
|
$name.focus(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!phone) { |
|
|
|
alert("请输入联系方式"); |
|
|
|
$phone.focus(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!agreed) { |
|
|
|
alert("请阅读并同意隐私政策"); |
|
|
|
return; |
|
|
|
} |
|
|
|
alert("提交成功,我们将尽快与您联系"); |
|
|
|
$form[0].reset(); |
|
|
|
}); |
|
|
|
// $(".section-contact-form").on("submit", function(e) {
|
|
|
|
// e.preventDefault();
|
|
|
|
// const $form = $(this);
|
|
|
|
// const $name = $form.find("[name=\"name\"]");
|
|
|
|
// const $phone = $form.find("[name=\"phone\"]");
|
|
|
|
// const name = $.trim($name.val());
|
|
|
|
// const phone = $.trim($phone.val());
|
|
|
|
// const agreed = $form.find("[name=\"agree\"]").is(":checked");
|
|
|
|
// if (!name) {
|
|
|
|
// alert("请输入姓名");
|
|
|
|
// $name.focus();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (!phone) {
|
|
|
|
// alert("请输入联系方式");
|
|
|
|
// $phone.focus();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (!agreed) {
|
|
|
|
// alert("请阅读并同意隐私政策");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// alert("提交成功,我们将尽快与您联系");
|
|
|
|
// $form[0].reset();
|
|
|
|
// });
|
|
|
|
$("#nav-mega-product").on("mouseenter", "[data-mega-cat]", function() { |
|
|
|
const $mega = $("#nav-mega-product"); |
|
|
|
const cat = $(this).attr("data-mega-cat"); |
|
|
|
|