How to use JQuery to remove dynamic content?
Posted
by ed.talmadge
on Stack Overflow
See other posts from Stack Overflow
or by ed.talmadge
Published on 2010-05-02T19:01:05Z
Indexed on
2010/05/02
19:08 UTC
Read the original article
Hit count: 194
I have an html page that is generated by a CMS. I cannot modify the page, but can add JavaScript.
Each time the page loads, a JavaScript function (that I cannot modify) dynamically inserts a paragraph onto the page.
How can I use JQuery to .remove() that paragraph whenever it is loaded?
For example, when the page first loads, it look like this (blank):
<div></div>
Then, a few seconds later, a JavaScript function (that I have no control over) adds a paragraph to the page. The page then looks like this:
<div><p id="foo">bar</p></div>
How can I use JQuery to remove the paragraph with id=foo each time it is dynamically loaded onto the page?
© Stack Overflow or respective owner