I have a working example of a jQuery UI sorting function. I apply it to an HTML table to drag and sort table rows. It works fine, except that I want to exclude sorting of certain string classes. Using the items parameter, I can successfully exclude the ONE class (class "list-button-bar" ), but I canβt understand for the rest of my life the syntax of how to exclude more than one class. For example, I want to exclude <th> and other <tr> classes.
This is probably one of the ones in the documentation, but I am not familiar with the jQuery user interface yet to know what to look for.
Here's the working code:
<script> $(function() { $("#applications_list tbody.list-tbody").sortable({ items: "tr:not(.list-button-bar)", cursor: 'crosshair' }); $("#applications_list tbody.list-tbody").disableSelection(); }); </script>
source share