It would be like soooo much easier if these one-liner droppables would work with accept conditions such as masterClass divs containing a child checkbox with class .addClass :
- $("#Mysortable").droppable({
- accept : $("input:checkbox.addClass").parent().hasClass('masterClass');
- revert : $("input:checkbox.revertClass").parent().hasClass('masterClass');
- ...
or:
- ...
- drop: function( event, ui ) {
- if ( $("input:checkbox.revertClass").parent().hasClass('masterClass')) {
- return false; // Reverts div to draggable container
- } ...
Anyone able to figure out some code that would achieve what I want? I can't change the divs .masterClass and the only .masterClass divs that can be dropped in the receiving container are the ones containing a checkbox with class .addClass. All other .masterClass divs containing checkboxes with class .revertClass must revert to their originating container if dropped in any other droppable container. Help? - dan