Seems like jQuery $.hide() and $.show() do not modify the DOM to hide/show the element, and hence do not fire DOMSubtreeModified event. How can I capture those kind of events on any element on the DOM?
UPDATE:
The code doesn’t work on Chrome16 Ubuntu. Originally, I need to target QT browser, which is based on Webkit.
you are correct,
DOMSubtreeModifiedis purely for modifications so you have a few choices:1) use
DOMAttrModifiedwhich has just as bad if not worse support thanDOMSubtreeModified2) override the
.hide()and.show()methods in jQuery so you can capture any calls to them and respond:3) run some kind of “monitor” in a loop (eg.
setInterval()), looking at the visible children counts or something to that affect4) re-organize the way you are thinking about the problem…
hope this helps -ck