Bug Tracker

Opened 12 years ago

Closed 12 years ago

#3749 closed feature (invalid)

Preserve children when deleting elements

Reported by: kkaefer Owned by: flesler
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc: kkaefer
Blocked by: Blocking:

Description

It is sometimes necessary to preserve the children of an element and just delete the element itself (e.g. when you wrap/wrapInner an element and want to get rid of the wrapper). This patch adds a removeThis() function to jQuery.

Attachments (2)

jquery-removethis.patch (447 bytes) - added by kkaefer 12 years ago.
better code style
preservechildren.patch (693 bytes) - added by kkaefer 12 years ago.
alternative patch that extends the .remove() function instead of adding another function

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by kkaefer

Attachment: jquery-removethis.patch added

better code style

Changed 12 years ago by kkaefer

Attachment: preservechildren.patch added

alternative patch that extends the .remove() function instead of adding another function

comment:1 Changed 12 years ago by flesler

Cc: kkaefer added
Component: unfilledcore
Resolution: invalid
Status: newclosed

You can do that manually when needed. Is not a commonly needed feature/addition.

Note: See TracTickets for help on using tickets.