jQuery: $().click(fn) vs. $().bind('click',fn);

前端 未结 7 1770
北荒
北荒 2020-11-28 03:37

When using jQuery to hookup an event handler, is there any difference between using the click method

$().click(fn)

versus using the bind me

7条回答
  •  無奈伤痛
    2020-11-28 04:03

    There is the [data] parameter of bind which will occur only at bind-time, once.

    You can also specify custom events as the first parameter of bind.

提交回复
热议问题