Disable drag of item when item is dropped...?

Disable drag of item when item is dropped...?

Hello, I'mdeveloping a drag n drop interface, in which items can be dragged into a basket - at which point they freeze in the item list (cant be dragged). However, I cannot get the draggable('disable') to work within the drop function. The disable function works perfectly if I call it externally such as via submit button using oncick - but calling it within the drop function just does not work.

Can anyone help me address this issue please?

Here's the code:

<script>
$(document).ready(function(){

$("#basket_item1").draggable({helper: 'clone'}); //the draggable item

$(".basket_bin").droppable({ //where stuff is dropped

accept: "#basket_item1",
activeClass: 'basket_bin-active',
hoverClass: 'basket_bin-hover',

drop: function(ev, ui) {
//1. add graphic representation of item
$('#bin_content').append("<a id='basket_dropped_item1' href='gallery.php?id=1'class='inner_gallerythumbs_first gallery_imgthumb_leftfloat'><img src='images/demosmall6.jpg' alt='small' /></a><br />");
$('#gallery_itemcontainer_1').addClass("gallery_itemcontainer_hide"); //hide corresponding entry on left side
$('#basket_dropped_item1').draggable({helper: 'clone'}); // add newly created dropepd item (in basket/bin) to dom

//fade out and disable corresponding itemcontainer
$('#gallery_itemcontainer_1').fadeTo("slow", 0.3);

alert($(ui.draggable.element).attr("id")); /* get the droppable ID*/


//this is whereit's called, though it will not disable the drag!
$('#basket_item1').draggable("disable");


}
});

...etc

I look forward to some help!