我在 slideDown 方法中有问题。
事件 slideDown 无法正常工作...当我单击按钮运行 slideDown 方法时,这半部分打开并快速关闭:(此页面用于密码恢复并使用 PasswordRecovery
<asp:Content ID="Content2" ContentPlaceHolderID="js" runat="server">
<script type="text/javascript">
$(document).ready(function () {
$(".passrecovery-btn").click(function () {
$("#pass-error").slideDown('slow');
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-content">
<div class="password-recovery">
<div class="identify-account">
<h1 class="identify">Identify Your Account</h1>
<hr />
</div>
<asp:PasswordRecovery ID="PassRecovery" runat="server">
<QuestionTemplate>
<table cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<table cellpadding="0">
<tr>
<td align="center" colspan="2">
Identity Confirmation</td>
</tr>
<tr>
<td align="center" colspan="2">
Answer the following question to receive your password.</td>
</tr>
<tr>
<td align="right">
User Name:</td>
<td>
<asp:Literal ID="UserName" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td align="right">
Question:</td>
<td>
<asp:Literal ID="Question" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Answer:</asp:Label>
</td>
<td>
<asp:TextBox ID="Answer" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="AnswerRequired" runat="server"
ControlToValidate="Answer" ErrorMessage="Answer is required."
ToolTip="Answer is required." ValidationGroup="PassRecovery">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Submit"
ValidationGroup="PassRecovery" CssClass="passrecovery-btn" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</QuestionTemplate>
<UserNameTemplate>
<table cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<table cellpadding="0">
<tr>
<td align="center" colspan="2">
Forgot Your Password?</td>
</tr>
<tr>
<td align="center" colspan="2">
Enter your User Name to receive your password.</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="PassRecovery">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Submit"
ValidationGroup="PassRecovery" CssClass="passrecovery-btn" />
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<div class="pass-error" id="pass-error"><asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal></div>
</td>
</tr>
</table>
<div class="loading">
<img src="../Static/images/Loadloading.gif" width="16" height="11" alt="" />
</div>
</tr>
</table>
</UserNameTemplate>
</asp:PasswordRecovery>
</div>
</div>
</asp:Content>
Css:
div.password-recovery
{
border:1px solid #333;
width:300px;
margin:0px auto;
text-align:center;
padding:30px 60px 0px 60px;
margin-top:30px;
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
font-size: 12px;
border-radius:5px;
overflow:visible;
}
div.pass-error{display:none;border:1px solid black;border-radius:5px;}