I know there is a way to detect changes in HTML attributes, DOM node subtree, etc. However, I could not find a way to detect a change in the node property, such as offsetParent
of the certain div. This information tells me whether that div is displayed on the screen. So, if offsetParent
has the value of null
, it means that div is stil not visible on the page. I have tried with MutationObserver, Object.prototype.watch, but with no success.
Does enyone find the solution? Thanks.