views:

182

answers:

1

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('.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'));

A: 

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.

anomareh