I have a complicated DOM structure with divs, uls, li, and span elements. On this elements can be a jquery click event which do some logic.
If the application goes offline I have to disable the click events on this elements.
It is possible to add a generic click event which executes first, where I can check that the application is offline and if it's than stop the propagation?
I can have click events on each part of the dom structure. (Refactoring the DOM is not an option.)
EDIT:
<div>
<div>
<ul>
<li>
<div>
<span>
</span>
</div>
</li>
<li>
</li>
<ul>
</div>
I found event listeners on the spans and on the LI-s too.