I want when draggable div dragged into droppable div, the droppable div color get another color, then draggable div width/height get bigger and exactly fit to droppable div.
Here is a JSFiddle
for example, when you dragging red circle into the big circle, i want to chang big div color to red, and red circle get fit to big div.
for these questions i wrote down these codes:
if ($(draggable).hasClass('dropped')) {
droppable.css({
background: 'red'
});
draggable.css({
width: '300px',
height: '300px'
});
}
but these doesn't works, and i dunno how to make draggable fit to droppable.