The droppable box in the code below accepts two different draggables. As you can see when one of them is dropped only the #draggable changes colour. What could i do so that when one draggable is dropped it changes colour and not the other one.
Something like $(this) would work but that would change the drop styling not the drags. Im guessing an if statement would work but I'm not sure how to set it up.
Thanks
Craig
- $( "#droppable" ).droppable({
- accept: '#draggable, #draggable3',
- drop: function( event, ui ) {
- $("#draggable").css("color","#95CB6C");
- ui.draggable.destroy();
- }
-
- });