Jquery sortable question
Jquery sortable question
Good day everyone, this is my first post here as i'm sure yall can tell. I am a jquery....... well a dummy. I need a little bit of help I am attempting to create a page with multiple sortable lists on it and I want to be able to sort from one list to another (this is working fine with the connectWith: ".connectedSortable"). My problem is when I want to write the results to a db, I am not sure how to get 2 pieces of data the first is which list is it in, the second is the order number. I'm attaching what I currently have for reference..
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Improvements</title>
</head>
<script src="Improvements_files/jquery-1.js"></script>
<script src="Improvements_files/jquery-ui.js"></script>
<style>
#sortable1, #sortable2 { list-style-type: none; margin: 100; padding: 100; float: left; margin-right: 10px; background: #eee; padding: 10px; width: 90%; align: center; }
#sortable1 li, #sortable2 li { margin: 5px; padding: 5px; font-size: 1.2em; width: 20%; border: 1px solid #ffa500; background-color: #b17200; color: white;}
</style>
<script>
$(function() {
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable"
})
});
</script>
<body>
<div id="wrapper" style="width: 99%; ">
<br><br>
<ul id="sortable1" class="connectedSortable ui-sortable" style="border: 1px solid #7474ff;"> Daily top 3
<li>Energy Management Review</li> <li>Construction Assessment (if applicable)</li>
</ul>
<ul id="sortable2" class="connectedSortable ui-sortable" style="border: 1px solid #ece3ae;"> A Priorities
<li>Physical Plant Assessment</li> <li>Key Control Plan</li> <li>Tool Inventory</li>
</ul>
</div>
</body></html>