Thx a lot. Guess I was just thinking way too complicated. ;-)

Fredi


Jörn Zaefferer wrote:
> 
> Subway schrieb:
>> Let's say I have a structure like this:
>>
>> <div id="container">
>>
>> <div id="box1">box 1 content</div>
>> <div id="box2">box 2 content</div>
>> <div id="box3">box 3 content</div>
>> <div id="box4">box 4 content</div>
>>
>> </div>
>>
>> Now how do I move one of those divs, lets say box3 to the top of the
>> divs?
>> The result should look like this:
>>
>> <div id="container">
>>
>> <div id="box3">box 3 content</div>
>> <div id="box1">box 1 content</div>
>> <div id="box2">box 2 content</div>
>> <div id="box4">box 4 content</div>
>>
>> </div>
>>
>> How can I do this? I'm new to jQuery, so maybe I've just missed
>> something,
>> but currently I just can't figure that one out.
>>   
> $('#box3').prependTo('#container')
> 
> As long as you don't clone the node, inserting it elsewhere will move 
> it. You may want to aslo check insertBefore, insertAfter, prependTo and 
> appendTo.
> 
> -- 
> Jörn Zaefferer
> 
> http://bassistance.de
> 
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Move-element-to-top-of-outside-element%2C-how--tf2657866.html#a7416952
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to