Skip to content
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
Closed

Enhancement: selector for Unwrap #1744

mgol opened this issue Oct 21, 2014 · 1 comment

Comments

@mgol
Copy link
Member

@mgol 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
Copy link
Member Author

@mgol 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 Enchancement: selector for Unwrap 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
Fixes gh-1744
Closes gh-2003
(cherry picked from commit 7b09235)
@dmethvin dmethvin added this to the 1.12/2.2 milestone Jan 7, 2016
@dmethvin dmethvin removed this from the 3.0.0 milestone 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants