Using .one() with .live() jQuery

前端 未结 6 2045
感动是毒
感动是毒 2020-12-09 04:32

I was using the live() function:

$(\'a.remove_item\').live(\'click\',function(e) {});

I needed to change this to one()

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 04:44

    I use it on $.ajax function, so, on the final, in my case fail, I use ,500 in order to delay it and stop to resend many times.

    }).fail(function(response, status){ alert("FAILED: "+JSON.stringify(response, null, 4)); },500);

    I hope it helps you!

提交回复
热议问题