views:

17

answers:

1

i can use this code to remove click event,

$('p').unbind('click')

but , has some method to remove all event ?

has a method named unbindAll in jquery ?

thanks

+5  A: 

You can call .unbind() without parameters to do this:

$('p').unbind();

From the docs:

In the simplest case, with no arguments, .unbind() removes all handlers attached to the elements.

Nick Craver
This, standard .unbind() with no event type or handler will unbind all.
MoDFoX