我想在具有类 .removeRow 的 div 中“找到”一个按钮后使用 alertify.js
$(".removeRow").find("button").click(function(){
alertify.confirm("remove this field?", function (e) {
if (e) {
// user clicked "ok"
$(this).closest(".agrRow").remove();
}
});
});
问题是在我调用 alertify 之后,我失去了“this”的值。如何将“this”传递给 alertify 函数?