Jquery脉冲结束后,有可能做点什么吗

Is it possible to do something after Jquery pulsate finishes?

本文关键字:什么 有可能 脉冲 结束 Jquery      更新时间:2023-09-26

我正在使用onfocuout函数检查一个表单,该表单中的输入值已存在于数据库中。如果存在,我将输入脉动5次,如下所示;

  cell.pulsate({ //cell is my selector 
         color: "#bf1c56",
         repeat: 5,
  });

但问题是,我没有得到脉冲结束。我想在pulsate工作5次后将css添加到输入中。我找不到完整或完成选项的脉冲。有我想要的用法吗?

您应该使用toggle方法

cell.toggle( "pulsate", {
    color: "#bf1c56",
    repeat: 5
}, function() {
    alert("I will be called when pulsate is finished");
});