The unwrap
method will work fine (you can select any of/any number of the siblings):
$("#innerDiv1").unwrap();
From the docs (emphasis added):
The matched elements (and their siblings, if any) replace their
parents within the DOM structure.
More Related Contents:
- how to select children elements? [closed]
- What will be selector for multi class HTML element in CSS or JQuery?
- Event handler not working on dynamic content [duplicate]
- How to parse JSON data with jQuery / JavaScript?
- XMLHttpRequest Origin null is not allowed Access-Control-Allow-Origin for file:/// to file:/// (Serverless)
- What are the differences between normal and slim package of jquery?
- How to retrieve checkboxes values in jQuery
- What is the difference between these jQuery ready functions?
- Trigger click on input=file on asynchronous ajax done()
- jQuery won’t parse my JSON from AJAX query
- How to check if image exists with given url?
- jQuery or CSS selector to select all IDs that start with some string [duplicate]
- jQuery ajax success anonymous function scope
- Can you detect “dragging” in jQuery?
- jQuery easing functions without using a plugin
- Dealing with line Breaks on contentEditable DIV
- Trouble with jQuery Dialog and Datepicker plugins
- What’s the difference between keyup, keydown, keypress and input events?
- How can I convert a DOM element to a jQuery element?
- How do I get the height of a div’s full content with jQuery?
- jQuery scrollTop not working in Chrome but working in Firefox
- Check if username exists in database with AJAX
- Select link by text (exact match)
- append /remove anchor name from current url without refresh
- How can I change HTML attribute names with jQuery?
- A cleaner way to select by multiple possible attribute values?
- Populate Select box options on click with Javascript/Jquery with Json data
- Modify a svg file using jQuery
- How do I reset a jquery-chosen select option with jQuery?
- jquery can’t get data attribute value