【发布时间】:2012-05-05 02:50:17
【问题描述】:
我对一些 JQuery 有部分看法......
$("#btnCancelPayment").click(function () {
$(this).closest('#test').show('fast');
$(this).closest("#paymentSection").hide('fast');
});
这个部分视图位于根视图中 id 为 paymentSection 的 div 中...想知道如何在根视图上找到除 paymentSection div 之外的其他元素...(上面的隐藏有效,但显示没有)。根视图:
<div id="test">testing </div>
<div id="paymentSection"></div>
这是 JQuery...
$("#btnYesPayment").click(function () {
....
$("#paymentSection").load('/Donation/AddPaymentInfo', function () {
$("#paymentSection").show('fast');
$('#spinner').hide();
});
});
有什么想法吗?谢谢!
【问题讨论】:
-
你有多个
ids吗?如果是,则删除它们
标签: c# jquery asp.net-mvc-3 views show