The Below is the example for the list sort with demo
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<style>
.list {
list-style: none outside none;
margin: 10px 0 30px;
}
.list>li {
width: 200px;
padding: 5px 10px;
margin: 5px 0;
border: 2px solid #444;
border-radius: 5px;
background-color: #EA8A8A;
font-size: 1.1em;
font-weight: bold;
text-align: center;
cursor: move;
}
</style>
<ul id="sortable" class="list">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
<script>$("#sortable").sortable();</script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<style>
.list {
list-style: none outside none;
margin: 10px 0 30px;
}
.list>li {
width: 200px;
padding: 5px 10px;
margin: 5px 0;
border: 2px solid #444;
border-radius: 5px;
background-color: #EA8A8A;
font-size: 1.1em;
font-weight: bold;
text-align: center;
cursor: move;
}
</style>
<ul id="sortable" class="list">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
<script>$("#sortable").sortable();</script>
Demo
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
0 comments:
Post a Comment