how to unbind all event using jquery

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.


As of jQuery 1.7, off() and on() are the preferred methods to bind and unbind event handlers.

So to remove all handlers from an element, use this:

$('p').off();

or for specific handlers:

$('p').off('click hover');

And to add or bind event handlers, you can use

$('p').on('click hover', function(e){
    console.log('click or hover!');
});

To remove all event bindings from all elements including document use :

$(document).off().find("*").off();