You should dynamically check for this in the start event.
If the target element has the active
class, cancel the action :
$('#list').sortable({
items: 'li',
start: function(e, ui){
if ( ui.item.hasClass('active') ) {
// "return false" does not work - the widget does not seem to consider
// that it should cancel the whole dragging, and enters a broken state.
//
// When this callback is executed, the "start" event is not
// fully handled yet.
// You have to wait for its end, then cancel the action :
setTimeout(function(){
$('#list').sortable('cancel');
}, 0);
}
}
});
fiddle - jQuery 1.8.3, jQuery-ui 1.9.2