我使用默认确认框通过ajax删除记录,效果很好。 这是工作代码 http://pastebin.com/HZxDVAgU 但是当我使用alertify时,它会删除该记录但不会隐藏它。 这是不起作用的代码 http://pastebin.com/7q1sH5gM
这是隐藏记录的代码
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
最佳答案
在alertify回调中this
指的是窗口,指的是被调用者对象,您可以使用存储原始元素引用的element
变量。
代码:
element.parents(".record").animate({
backgroundColor: "#fbc7c7"
}, "fast")
.animate({
opacity: "hide"
}, "slow");
关于javascript - 使用alertify和ajax删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21363483/