Stackoverflow Response: jquery sortable with multiple tbody

http://stackoverflow.com/questions/16151800/jquery-sortable-with-multiple-tbody/16153268#16153268

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<table id="sortable">
 <thead>
        <tr>
            <th>Col1</th>
            <th>Quantity</th>
        </tr>
    </thead>
 <tbody>
        <tr>
            <th scope="rowgroup">Col1</th>
            <th>100</th>
        </tr>
        <tr>
            <td>Col1</td>
            <td>20</td>
        </tr>
        <tr>
            <td>Col1</td>
            <td>30</td>
        </tr>
        <tr>
            <td>Col1</td>
            <td>50</td>
        </tr>
    </tbody>
</table>
<br/>
<br/>
<br/>

<table id="sortable">
   
   
    <tbody>        
        <tr>
            <th scope="rowgroup">Col1</th>
            <th>100</th>
        </tr>
        <tr>
            <td>Col1</td>
            <td>20</td>
        </tr>
        <tr>
            <td>Col1</td>
            <td>30</td>
        </tr>
        <tr>
            <td>Col1</td>
            <td>50</td>
        </tr>
    </tbody>
</table>

JavaScript

$("#sortable > tbody").sortable({
    items: 'tr:has(td)'
    
    // comment the following line if you don't want rows droppable across multiple <tbody>
    ,connectWith: 'tbody' 
});