I love the animation running when you promote (or later restore) a search result on google. This can be done by clicking the little arrows at the end of a result item. The item is moved up or down wi开发者_如何学Goth the rest of the page still visible. Check it out.
Did anyone work with the corresponding javascript or program a similar thing?
A very quick right click after I click the remove button shows me the image below. Therefore, they must animate through the "frames" of the image by changing its position vertically.
For the promote/demote thing, it's probably something similar to this, but with the movement done automatically: http://www.jqueryui.com/demos/draggable/#sortable
EDIT: Each search result is in its own list item. Judging by what changes I see in Firebug, the items that move are changed to absolute positioning, and animated up/down. When they are in place, the HTML code is switched around (so that, say, the third list item is now the first) and the positioning removed.
精彩评论