Using Jquery UI sortable to sort 2 list at once

Viewed 2072

I have a very simple question. Using Jquery UI's sortable, I want to sort two Identical list at once. Let say I have two lists of 5 draggable objects each. Sorting one list will also sort the other list in an identical manner. Is there a way to do this with Jquery UI?

I have something like this to start...

<div class="list1">
    <div class="quote1">1</div>
    <div class="quote2">2</div>
    <div class="quote3">3</div>
    <div class="quote4">4</div>
    <div class="quote5">5</div>
</div>

<div class="list2">
    <div class="quote1">1</div>
    <div class="quote2">2</div>
    <div class="quote3">3</div>
    <div class="quote4">4</div>
    <div class="quote5">5</div>
</div>

<script>
$(function() {
    $( ".list1" ).sortable();
    $( ".list1" ).disableSelection();

    $( ".list2" ).sortable();
    $( ".list2" ).disableSelection();
});
</script>
2 Answers
Related