I have the following code that works fine i am trying to get the items to stack when they get moved into boxA. How would i go about that?
$(function () {
$("#sortable").sortable();
$("#boxA").droppable({
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function (event, ui) {
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
find('li').children().remove();
}
});
<div id='main_content'>
<ul id="sortable">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
<div id='boxA' class='ContentBoxes'>
<div class='ContentMenu'>Column A</div>
<p>Drop an item on me.</p>
</div>