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

194
Views
EventListener to determine when data-src changes to src

So I've been messing with a piece of code for some time now, and I can't seem to properly determine when data-src changes to src - So I want to see if I can hook a EventListener to an element and see if we can properly determine it then.

So let's say that I have the following element let iframe = videoWrapper.html(videoElement).children('iframe'); which gives me:
enter image description here

Which renders like this:
enter image description here

Please note: A third-party implementation changes the data-src to src dynamically based on various actions.

Question:
What is the best approach to take to check when the data-src has switched over to src and then execute conditionals/methods? I'd like to hook a event listener to determine that, but I don't know which one would be the right approach.

All help is appreciated!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

MutationObserver The MutationObserver interface provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature, which was part of the DOM3 Events specification. Read more...

about 4 years ago · Juan Pablo Isaza Report
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!