In JQuery when should you use .bind() over .click() - or any other given event?

后端 未结 5 1500
离开以前
离开以前 2021-02-08 03:22

I understand the difference between Live and Bind but when should I use use .bind() over a \'standard\' event method as shown below.

Are there any key differ

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 04:04

    I use the explicit methods when available. I use the bind when a method isn't available like for window.onbeforeunload

    The other time to use bind is if your are developing and switching between "live" and "bind".

提交回复
热议问题