jQuery Stop .blur() event when clicking “submit” button

后端 未结 4 1461
暗喜
暗喜 2021-02-07 17:36

I am building a small landing page with a simple demo e-mail signup form. I want to have the form field open up when focused, and then shrink back down on blur.

However

4条回答
  •  北海茫月
    2021-02-07 18:06

    Try this inside .blur handler:

    if ($(':focus').is('#submitbtn')) { return false; }
    

提交回复
热议问题