Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10057 closed feature (wontfix)

Consistency: no unwrapInner() available.

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: manipulation Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:



it is nice that we have a wrapInner() function for wrapping the contents of an element - unfortunately, there is no function which does the opposite: unwrapInner(). As there is a unwrap() function nothing should be wrong adding a the missing unwrapInner() to jQuery.

I'm working on a project which heavily requires wrapping and unwrapping, a solution would be very appreciated!

Change History (3)

comment:1 Changed 11 years ago by timmywil

Component: unfiledmanipulation
Priority: undecidedlow
Resolution: wontfix
Status: newclosed

I think it's simple enough to do a .contents().unwrap(). I'll close as wontfix, but if any of the team feels differently, please reopen.


comment:2 Changed 11 years ago by Rick Waldron


comment:3 Changed 11 years ago by dmethvin

Since you can wrap several levels of stuff around the elements in a .wrap* method I am not sure how we could know what the "wrapper" consisted of anyway. Assuming it is a single parent element is wrong:

This structure may be nested several levels deep, but should contain only one innermost element. The structure will be wrapped around the content of each of the elements in the set of matched elements. -- http://api.jquery.com/wrapInner/

The code best able to determine this is the application, not jQuery.

Note: See TracTickets for help on using tickets.