Hi, I am new to Jquery and am trying to store the location and size of the elements on a page which are being sorted using the Jquery UI plugin. I want the user to "save" the current layout, and the data to be stored in a database using php/mysql so when they re-visit the elements will be the same size and location?
<script type="text/javascript">
$(function()
{
$("#sortable").sortable({
revert: true,
axis: 'y',
opacity: 0.9,
tolerance: 'pointer',
});
$("#draggable").draggable({
connectToSortable: '#sortable',
helper: 'clone',
revert: 'invalid'
})
$("#sortable").resizable({})
});
</script>
Above is part of my script which basically allows boxes to be sorted and dragged using a list.
Many Thanks.
EDIT:
<body>
<div class="demo">
<ul id="sortable">
<li class="ui-state-default">Item 1</li>
<li class="ui-state-default">Item 2</li>
<li class="ui-state-default">Item 3</li>
</ul>
</div>
I am trying to use div tags alone without having to get them in a list also? Without having to include the divs inside a list.
Thanks again.