Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
How do I know when an HTML element is available in the DOM?

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);
});

But I get this error enter image description here

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.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!