I'm trying to mimic the vote-up vote-down system that is on this website. Is there an easy way to move the position of a div in jquery (with animations)?
Say I have the following items:
<div id="items">
<div id="item1">item 1</div>
<div id="item2">item 2</div>
<div id="item3">item 3</div>
</div>
I'd like to be able to call a function which would smoothly move item 3 up one position to:
<div id="items">
<div id="item1">item 1</div>
<div id="item3">item 3</div>
<div id="item2">item 2</div>
</div>
Is there any easy way to do this in jQuery?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…