我的用戶界面問題顯示「ShowLink」。當頁面加載時,它會消失。從邏輯上講,當用戶點擊ShowLink時,它應該會淡出。任何人都可以幫助我解決代碼中的錯誤?當頁面加載時,JQuery切換不顯示
<table width="100%">
<tr>
<td valign="top" style="padding-top: 20px;">
<asp:Label ID="Label1" CssClass="number" runat="server" />
<div>
<a id="A1" href="#">Show Details</a>
</div>
</td>
<td valign="top" style="padding-top: 20px;">
<asp:Label ID="Label2" CssClass="question" runat="server" ClientIDMode="Static" />
<div id="Div1">
</div>
</td>
</tr>
</table>
<script type="text/javascript" src="/Scripts/jquery-1.7.2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#showLink').toggle(function() {
$('#questionDetails').load('/Reviews/Sub/ViewQuestion.aspx?id=<%= pageId %> #questionContainer');
$('#questionDetails').fadeIn();
$(this).text("Hide Detail...");
},
function() {
$('#questionDetails').fadeOut();
$(this).text("Show Detail...");
}
);
var nmbr = $(".number");
nmbr.parent().width(nmbr.width() + 50);
});
</script>
對不起,沒有工作。但是謝謝你的回覆。 – Partha