Try...
$('#d').clone().appendTo('div').before('text blab bla').after('ok
nana');
On Jan 14, 5:11 am, Equand [EMAIL PROTECTED] wrote:
i need to insert a clone of one dom object
i do
var hex = $(#d).clone();
$(div).append(text blab bla+hex+ok nana);
and it's not working...
how do i do this?
Clone does indeed make a copy of the element(s) but it returns them as
a jQuery array just like most of the other jQuery methods. If it is
the html you want then you counld try something like var hex = $
(div/div).append( $(#d).clone() ).html()
That copies your #d element into a new element
Maybe try (untested):
$('div').append('text blab bla').append($('#d')).append('ok nana');
--Erik
On 1/13/08, Equand [EMAIL PROTECTED] wrote:
i need to insert a clone of one dom object
i do
var hex = $(#d).clone();
$(div).append(text blab bla+hex+ok nana);
and it's not working...
how do
thanx, i just appended it
On Jan 14, 9:32 am, George [EMAIL PROTECTED] wrote:
Clone does indeed make a copy of the element(s) but it returns them as
a jQuery array just like most of the other jQuery methods. If it is
the html you want then you counld try something like var hex = $
4 matches
Mail list logo