Using jQuery you can do this:
var cnt = $(".remove-just-this").contents();
$(".remove-just-this").replaceWith(cnt);
Quick links to the documentation:
- contents( ) : jQuery
- replaceWith( content : [String | Element | jQuery] ) : jQuery
More Related Contents:
- How do I check if an element is hidden in jQuery?
- Why does jQuery or a DOM method such as getElementById not find the element?
- jQuery .live() vs .on() method for adding a click event after loading dynamic html
- Creating a new DOM element from an HTML string using built-in DOM methods or Prototype
- Detect element content changes with jQuery
- How can I select an element by name with jQuery?
- Event handlers inside a Javascript loop – need a closure?
- jQuery object and DOM element
- Javascript get XPath of a node
- How to resolve the C:\fakepath?
- Browser-independent way to detect when image has been loaded
- Can I load an entire HTML document into a document fragment in Internet Explorer?
- Difference between DOM parentNode and parentElement
- Intercept paste event in Javascript
- How to show a spinner while loading an image via JavaScript
- How do you set the document title in React?
- contentDocument for an iframe
- Can I change an HTML element’s type?
- “Cut and Paste” – moving nodes in the DOM with Javascript
- How to reference the caller object (“this”) using attachEvent
- Is there any way to accelerate the mousemove event?
- Inject CSS stylesheet as string using Javascript
- JavaScript: Is it better to use innerHTML or (lots of) createElement calls to add a complex div structure? [duplicate]
- Getting the text from a drop-down box
- Accessing a DOM object defined in an external SVG file
- How to properly unload/destroy a VIDEO element
- How to get element by class name
- How to do a wildcard element name match with “querySelector()” or “querySelectorAll()” in JavaScript?
- Getting width & height of an image with filereader
- Replacement for deprecated `keypress` DOM event