I have list items in an unordered list that, when double-clicked, can be edited using the wysiwyg editor.
$('ul.mtm_section').sortable({
disabled: true,
distance: 10,
items: '> li:not(:has(form))'
});
My goal is to prevent the sorting of the list item while it is being edited - otherwise, once the form element has been replaced in place of the content.
Unfortunately, my selector for elements does not work. Is sorting capable of handling complex selectors like these? If not, are there other smart tools to disconnect some items from sorting, perhaps a callback function?
I would rather rely on this sortable option, since the wysiwyg plugin is deeply nested jEditable and, as far as I know, does not open any events for me.
Using jQuery 1.4.2 and jQuery UI 1.8.1
source
share