I want to just set up a link that allows the user to jump a given sortable list element to the top of the list. I need something like
$('.sortable li:last-child').move('开发者_StackOverflow中文版.sortable li:first-child');
...where I can just cause a link to pop any list element up to the top of the list.
Never mind! I found the answer. $(id).prependTo($('#list'));
Not sure if it's the best solution but this should work.
$('.sortable li:last-child').live('click', function() {
$(this).prependTo('.sortable');
});
Kind of hard to help further without seeing more code.
精彩评论