New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: selector for Unwrap #1744

Closed
mgol opened this Issue Oct 21, 2014 · 1 comment

Comments

Projects
None yet
3 participants
@mgol
Member

mgol commented Oct 21, 2014

Originally reported by nlte@… at: http://bugs.jquery.com/ticket/13967

Unwrap simple removes the parent of selected elements, and accepts no arguments. In some cases it may be desirable to unwrap only if a condition on the parent is met. Enabling to pass a selector to Unwrap would allow this: if the parent matches the selector, then proceed, otherwise do nothing.

Issue reported for jQuery 1.10.0

@mgol mgol added this to the 3.0.0 milestone Oct 21, 2014

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Oct 21, 2014

Member

Comment author: dmethvin

I'm not a fan of the wrappish methods at all, but one reason is exactly this, .unwrap() blindly unwraps elements when the most common case would be that you want to remove a specific wrapper. So this seems like a decent idea if it can be done cheaply. Thoughts?

Member

mgol commented Oct 21, 2014

Comment author: dmethvin

I'm not a fan of the wrappish methods at all, but one reason is exactly this, .unwrap() blindly unwraps elements when the most common case would be that you want to remove a specific wrapper. So this seems like a decent idea if it can be done cheaply. Thoughts?

@dmethvin dmethvin changed the title from Enchancement: selector for Unwrap to Enhancement: selector for Unwrap Jan 12, 2015

@dmethvin dmethvin closed this in 7b09235 Mar 30, 2015

dmethvin added a commit that referenced this issue Mar 30, 2015

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.