javascript - change html preventDefault -


i have weird recursive situation.

i changing html inside element small widget , html5 contenteditable.

i binded on element events such as:

$('.myelement).on('domnodeinserted domnoderemoved domcharacterdatamodified', ..

those events trigger ajax call on success modifies same element.

$('.myelement').html(new_value)

but thing is, triggers binded events on element. , unstoppable ajax recursion.

is possible like

$('.myelement').html(new_value).preventdefault()

as in, don't trigger of binded events triggers?

no.

instead, can unbind handlers while update element, or set flag while updating , check flag in handler , nothing.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -