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

106
Views
Show Element after after AJAX reload

I have following code:

    K.API.Core.runWhenElementPresent('.product-media', function () {
    var KamH = '<div id="KamHi"><center><div class="KamCo"><span>Test</span></div>';
document.querySelector('.product-media').insertAdjacentHTML('afterbegin', KamH);
    });

K.API.Core.runWhenElementPresent is from my tool I work with and proofs if the class .product-media exists and insert "Test" at given place.

But I can change the product-media picture if I click at another color f.e.. Then an ajax call show the picture with another color (it doesn't replace the class, only the content), but my element is not there anymore.

Can you tell me, if it's possible to still show "Test" after the ajax call, and what do I have to do? jquery is not supported I think. (I'm no coder, so it would be awesome if you can give me the code I need)

Thank you

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!