3

我使用默认的确认框来删除带有 ajax 的记录,并且它工作得很好。这是工作代码 http://pastebin.com/HZxDVAgU 但是当我使用 alertify 时,它会删除记录但没有隐藏它。这是非工作代码 http://pastebin.com/7q1sH5gM

那是隐藏记录的代码

  $(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
    .animate({ opacity: "hide" }, "slow");
4

1 回答 1

0

在 alertify 回调this中引用窗口,引用被调用对象,您可以使用element存储原始元素引用的变量。

代码:

        element.parents(".record").animate({
            backgroundColor: "#fbc7c7"
        }, "fast")
            .animate({
            opacity: "hide"
        }, "slow");

演示:http: //jsfiddle.net/IrvinDominin/PUh6f/

于 2014-01-26T13:10:10.923 回答