Top "Dom-manipulation" questions

The process of changing the Document Object Model (DOM).

Jquery replaceWith not working

Using Jquery 1.7.1 I have two divs <div class="highlightStart"></div> {page content here} <div class="…

javascript jquery dom-manipulation replacewith
How can I remove wrapper (parent element) without removing the child?

I would like to remove the parent without removing the child - is this possible? HTML structure: <div class="…

javascript jquery html dom dom-manipulation
How to add a <tbody> to a specified <table > with jQuery?

I want to add the tbody below: <tbody id="contact"> ... </tbody> to a specified table: <…

jquery html-table dom-manipulation
Insert after parent of element

What sort of selector would be I need in order to insert after the parent (divouter) of the test3 class …

javascript jquery dom dom-manipulation
Remove element with jQuery but leave text

I've got some html that looks like this: <div> <span class="red">red text</span&…

javascript jquery dom-manipulation
Is there a way to get innerText of only the top element (and ignore the child element's innerText)?

Is there a way to get innerText of only the top element (and ignore the child element's innerText) ? Example: <…

javascript html dom dom-manipulation
remove an element that is before the selected element

I'm doing some form error handling/manipulation and I have the need to remove an error div that is before …

jquery dom-manipulation
How to remove original element after it was cloned?

HTML: <div id="test"> <p class="test1">test 1</p> <p class="test2">…

jquery dom-manipulation
Appending a DOM element twice (jQuery)

Can someone explain why the following snippet does not add <foo> to both #a and #b? HTML: <…

javascript jquery html dom dom-manipulation
Availability of MutationObservers in Internet Explorer

AFAIK mutation observers are not available yet in IE. Chrome, Safari, Firefox have their implementations and its working its way …

javascript internet-explorer dom-manipulation mutation-observers