JaySeanH
New Member
- Feb 6, 2017
- 19
- 2
Code:
<section id="sectionnow" class="jumbotron">
<div class="wholedashboard">
<div class="row2">
<div class="sortable contacts">
<div class="col-sm-6 text-left"> <h2>My Contacts <a href="contact" class="addcontact"> Add Contact </a> </h2> <div class="contactcontent"><p id="hello"></p></div> </div>
<div class="col-sm-6 text-right"> <h2>Documents</h2><div class="contactcontent"><p id="hello"></p></div> </div>
</div>
</div>
<div class="row2">
<div class="sortable Bills">
<div class="col-sm-12"> <h2>Bills</h2><div class="contactcontent"><p id="hello"></p></div></div>
</div>
</div>
<div class="row2">
<div class="sortable bottomthree">
<div class="col-sm-4 text-left"> <h2>Notes <a href="#" class="addcontact"> Update Notes </a> </h2><div class="contactcontent"><p id="hello"></p></div> </div>
<div class="col-sm-4 text-center"> <h2>Clients</h2><div class="contactcontent"><p id="hello"></p></div></div>
<div class="col-sm-4 text-right"><h2>Key Dates <a href="#" class="addcontacts"> New Key Date </a> </h2><div class="contactcontent"><p id="hello"></p></div></div>
</div>
</div>
</div>
</section>
<script>
$(document).ready(function () {
$('.sortable').sortable({ connectWith: '.sortable' });
});
</script>
So I have made a dashboard for a website in work and I want to make each div separately sortable. I have managed to do this and get them swapping position from side to side by dragging them, however I do not know how to get the div to swap positions with the div's below, or above them on the page. Any help would be appreciated