Hi everyone,
Having a slight spot of bother...
I have a draggable element that can be dropped into a sortable list. Ideally I would like to prevent draggable event creating a placeholder in the sortable if the sortable already contains an element with a matching class name of the draggable.
Not had any luck with so looking at removing the draggable once it has been placed in the sortable list using:
beforeStop: function(event,ui)
{
var $this = ui.item;
var person = $this.attr('class').replace(/(.)*a\-(\d*)(.*)/i,'$2');
if ($this.siblings('.a-'+person).length != 0)
{
$this.remove()
}
Unfortunatley that makes the intial draggable element no no longer draggable (I may wnat to move it into another sortable in the page so can't have that!) and not sure whether teh beforeStop option is teh most appropriate in this.
Any help you could possibly offer would be very much appreciated.