Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我调用fancybox对话框的代码:
$('.btnUpdateitem').fancybox({ openEffect : 'elastic', closeEffect : 'elastic', });
这是我删除特定表格行的代码:
$(this).closest('tr').remove();
但我的表格是基于 ajax 结果的:
不知道 $(this) 应该指什么上下文,所以:
在正确的背景下
$cachedClosest = $(this).closest('tr');
调用fancybox
$('.btnUpdateitem').fancybox({ openEffect : 'elastic', closeEffect : 'elastic', afterClose: function() { $cachedClosest.remove(); }) });
希望它有一点帮助