1.

How does jquery .on() work?

Answer»
  • The .off() METHOD REMOVES event handlers that were attached with .on().
  • Calling .off() with no ARGUMENTS removes all handlers attached to the elements.
<P>The following removes all event handlers from all paragraphs:$('p').off();

The following removes all delegated click handlers from all paragraphs:

$('p').off('click', '**');

The following removes just one previously bound handler by passing it as the third argument:

$('body').off('click', 'p', FOO); // ... Foo will no longer be called.



Discussion

No Comment Found