本文介绍了IE8中的jQuery slidetoggle问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
slidetoggle(''slow'')在Firefox中工作正常,但在IE8中工作不正常
单击时,将超链接设置为"tr"以进行切换,但是当显示tr时,控件将立即向下移动并弹出,从而制作某种动画.
如何像在Firefox中那样使此slidetoggle在IE8上正常工作
脚本:$(''#trPassword'').slideToggle(''slow'');
HTML:
slidetoggle(''slow'') is working fine in firefox, but it''s not working fine in IE8
On click, hyperlink a ''tr'' is set to toggle, but when the tr is being displayed, controls are moving down and coming up at once, making some sort of animation.
How to make this slidetoggle work for IE8 as in firefox
script: $(''#trPassword'').slideToggle(''slow'');
HTML:
<tr id="trPassword" runat="server" style="display: block;">
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr style="height: 30px">
<td style="width: 157px">
<asp:Label ID="lblPassword" runat="server">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="150px" TabIndex="4"
CssClass="textboxFont">
</asp:TextBox>
<asp:RequiredFieldValidator ID="reqPassword" runat="server" ControlToValidate="txtPassword"
Display="None" ErrorMessage="Password is required." ValidationGroup="test" SetFocusOnError="true">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="height: 30px">
<td style="width: 157px">
<asp:Label ID="lblConfirmPwd" Width="157px" runat="server">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtConfirmPwd" runat="server" TextMode="Password" Width="150px"
TabIndex="5" CssClass="textboxFont">
</asp:TextBox>
<asp:RequiredFieldValidator ID="reqConfirmPassword" runat="server" ControlToValidate="txtConfirmPwd"
Display="None" ErrorMessage="Confirm Password is required." ValidationGroup="test"
SetFocusOnError="true">
</asp:RequiredFieldValidator>
<asp:CompareValidator ID="cmpPassword" runat="server" ErrorMessage="Password Must Match."
ControlToCompare="txtPassword" ControlToValidate="txtConfirmPwd" ValidationGroup="test"
Display="None" SetFocusOnError="true">
</asp:CompareValidator>
</td>
</tr>
</table>
</td>
</tr>
推荐答案
<tr id="trPassword" runat="server" style="display: block;">
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr style="height: 30px">
<td style="width: 157px">
<asp:Label ID="lblPassword" runat="server">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="150px" TabIndex="4"
CssClass="textboxFont">
</asp:TextBox>
<asp:RequiredFieldValidator ID="reqPassword" runat="server" ControlToValidate="txtPassword"
Display="None" ErrorMessage="Password is required." ValidationGroup="test" SetFocusOnError="true">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="height: 30px">
<td style="width: 157px">
<asp:Label ID="lblConfirmPwd" Width="157px" runat="server">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtConfirmPwd" runat="server" TextMode="Password" Width="150px"
TabIndex="5" CssClass="textboxFont">
</asp:TextBox>
<asp:RequiredFieldValidator ID="reqConfirmPassword" runat="server" ControlToValidate="txtConfirmPwd"
Display="None" ErrorMessage="Confirm Password is required." ValidationGroup="test"
SetFocusOnError="true">
</asp:RequiredFieldValidator>
<asp:CompareValidator ID="cmpPassword" runat="server" ErrorMessage="Password Must Match."
ControlToCompare="txtPassword" ControlToValidate="txtConfirmPwd" ValidationGroup="test"
Display="None" SetFocusOnError="true">
</asp:CompareValidator>
</td>
</tr>
</table>
</td>
</tr>
这篇关于IE8中的jQuery slidetoggle问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!