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'));
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With