I have two DIV elements on a webpage. I want to remove inner html of DIV B, if inner HTML of DIV A is added via a third party script which is not under my control.
What is the best way to achieve that in JS?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could just remove inner html ofDIV id=bwhen you apply inner HTML toDIV id=a?Or if that’s not possible, you could track the innerHTML of
DIV id=awith a timer and see when it gets populated:Note that the html structure must be like this:
<div id="a"></div>I.E. no whitespace.