Is there a way to dynamically change the position of sortable divs at runtime? Below is my HTML code:
<div id="sortable2" class="connectedSortable">
<div id="div1" class="ui-state-highlight">Item 1</div>
<div id="div2" class="ui-state-highlight">Item 2</div>
</div>
And here is my jQuery code:
<script type="text/javascript">
$(document).ready(function () {
$("#div2").css({
left: 701.33334350585937,
top: 6.3333358764648437
});
$("#div1").css({
left: 701.33334350585937,
top: 50.3333358764648437
});
$("#div1").collapsible = true;
$("#sortable2").css({
height: 'auto'
});
});
However, when I set the position of the divs and use the absolute positioning property, the height of the 'sortable' div does not adjust accordingly. Additionally, I am unable to change the position of the divs through drag and drop. Can someone assist me in resolving this issue caused by absolute positioning?
Thank you in advance.