Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#107 closed enhancement (fixed)

There should be a .clone()

Reported by: john Owned by:
Priority: minor Milestone: 1.0
Component: core Version: 1.0
Keywords: Cc:
Blocked by: Blocking:

Description

If .appendTo(), and .prependTo() are going to be kept, there needs to be a .clone() function.

Change History (2)

comment:1 Changed 11 years ago by CBWhiz

Hack with latest SVN:

$.fn.clone = function() {

return this.pushStack(

jQuery.map( this,

function(i){

return i.cloneNode(true);

})

, arguments );

};

Usage:

$('#the_tr').clone().appendTo('#destination_table');

comment:2 Changed 11 years ago by john

Priority: majorminor
Resolution: fixed
Status: newclosed

Added in SVN rev 213.

Note: See TracTickets for help on using tickets.