Bug Tracker

Modify

Ticket #10057 (closed feature: wontfix)

Opened 21 months ago

Last modified 21 months ago

Consistency: no unwrapInner() available.

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

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

comment:1 Changed 21 months ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to manipulation

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/

comment:2 Changed 21 months ago by rwaldron

+1

comment:3 Changed 21 months 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.