[英]Hide function hidden contact form
Contact form sending, no problem.javascript code; 发送联系表格,没有问题。javascript代码; sucess function in hide() not working.I want to hide html div id="contactform"
hide()中的成功函数不起作用。我想隐藏html div id =“ contactform”
What is the problem? 问题是什么? Contact form html in div hide why not working?
div中的联系表单html隐藏为什么不起作用?
HTML CODE HTML代码
<!--sending after div hide not working?-->
<div id="contactform">
<form id="contact" action="">
<fieldset>
<label for="name" id="name_label">NAME</label>
<input type="text" name="name" id="name" size="50" value="" class="text-input" >
<span class="error" id="name_error">PLEASE NAME</span>
<label for="email" id="email_label">EMAIL</label>
<input type="text" name="email" id="email" size="50" value="" class="text-input" >
<span class="error" id="email_error">PLEASE EMAIL</span>
<span class="error" id="email_error2">EMAIL ERROR</span>
<label for="phone" id="phone_label">TELEPHONE</label>
<input type="text" name="phone" id="phone" value="" class="text-input" >
<label for="msg" id="msg_label">MESSAGE TEXT</label>
<textarea cols="60" rows="5" name="msg" id="msg" class="text-input"></textarea>
<span class="error" id="msg_error">PLEASE MESSAGE</span><br >
<input type="submit" name="submit" class="button" id="submit_btn" value="Gonder" >
</fieldset>
</form>
<div id="message"></div>
</div>
JavaScript CODE JavaScript代码
jQuery.ajax({
type: "POST",
url: "aspmail.asp",
data: dataString,
success: function() {
jQuery('#contactform').html("<div id='message'></div>");
jQuery('#message').html("<strong>Message send</strong>")
.append("<p>thank you</p>")
.hide() // not working hide?
.fadeIn(1500, function() {
jQuery('');
});
}
});
return false;
});
});
试试.css(“ display”,“ none”)而不是hide()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.