Bug Tracker

Modify

Ticket #3749 (closed feature: invalid)

Opened 4 years ago

Last modified 4 years ago

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
Blocking: Blocked by:

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

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

Change History

Changed 4 years ago by kkaefer

better code style

Changed 4 years ago by kkaefer

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

comment:1 Changed 4 years ago by flesler

  • Cc kkaefer added
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfilled to core

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

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.