Oliver Boermans schrieb:
> Not tested - but I'm guessing something like this will work?
> 
> $('elementtoappend').appendTo($(this).parent());
> 
> where 'elementtoappend' is the selector for the element you wish to insert.
> 
> On 05/03/07, Seb Duggan <[EMAIL PROTECTED]> wrote:
>> I want to take an element, and prepend it to its own parent element.


That won't work, what does "this" resolve to in that case? But the idea 
is correct of course. Try this (example code):

$('#parent li').each(function() {
     $(this).prependTo(this.parentNode);
});


-- Klaus


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to