#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: |
Description
Hi,
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
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → low |
Resolution: | → wontfix |
Status: | new → closed |
comment:3 Changed 11 years ago by
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.
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.
http://jsfiddle.net/timmywil/67skY/