【发布时间】:2012-03-10 02:47:32
【问题描述】:
我有以下脚本来淡化然后删除表格行,但它只会删除该行。
function deleteconfirmation() {
$(this).fadeOut('slow', function () { $(this).remove(); });
jAlert('The Answer was deleted succsfully', 'Deletion Confirmation');
}
那么是否可以在删除表格行之前将其淡出?如果是,我该怎么做?
编辑:-这是将删除其行的表:-
@foreach (var answer in Model.Answers.OrderBy(a=> a.IsRight))
{
<tr id = @answer.AnswersID>
<td>
@Html.DisplayFor(modelItem => answer.Description)
</td>
<td>
@Html.DisplayFor(modelItem => answer.Answer_Description.description)
</td>
<td>
@Ajax.ActionLink("Delete", "Delete", "Answer",
new { id = answer.AnswersID },
new AjaxOptions
{
//OnBegin = "deleteconfirmation1",
Confirm = "Are You sure You want to delete this Answer ?",
HttpMethod = "Post",
UpdateTargetId = @answer.AnswersID.ToString(),
OnSuccess = "deleteconfirmation",
OnFailure = "deletionerror"
})
</td>
</tr>
}
【问题讨论】:
-
哪些浏览器会给您带来问题?
-
...如果是 IE,请参阅stackoverflow.com/questions/2437026/…
-
IE 和 firefox 都不会淡出,它们只会删除表格行..
-
我猜有些版本的 IE 不支持 opacity 所以fadeOut 不起作用。
-
但我在 IE、firefox、chrome 上试过了,但它们都不支持淡出!!!
标签: jquery asp.net-mvc-3 fadeout