I have list items in an unordered list that when double clicked, can be edited in place via a wysiwyg editor.
$('ul.mtm_section').sortable({
disabled: true,
distance: 10,
items: '> li:not(:has(form))'
});
My goal is to prevent the list item from being sorted while it is being edited - aka once a form element has been swapped in place of the contents.
Unfortunately my selector for items is not working. Is sortable able to handle complex selectors like these? If not, are there other clever means to disable some items from being sortable, perhaps a callback function?
I would prefer to rely on this sortable option, as the wysiwyg plugin is deeply nested with jEditable and as far as I know does not open up any events for me to hook into.
Using jQuery 1.4.2 and jQuery UI 1.8.1