Excuse me if my question is not well asked, I will explain the problem.
I have an element <div class="o_notification_manager"></div>
that appears after an uncertain time on the screen to display notifications. I want to make changes on this element as soon as it is displayed.
I thought of something like this with jquery
$(document.querySelector('.o_notification_manager')).ready(function() {
console.log(document.querySelector('.o_notification_manager').innerHTML);
});
When I use the setTimeout()
or setInterval()
function, I get two error cases:
- Either my code runs before the element is displayed and I get the previous error;
- or my code runs after the element is displayed and the user sees the element change (he sees the content change, the width change). I want my code to run at the same time as the element is displayed. Any help is welcome.