Documentation

UI/API/1.6/Sortable

From jQuery JavaScript Library

Jump to: navigation, search

This is an old version of the Sortable API:
View the Current API

« Back to the jQuery UI Docs

NameType
Dependencies:

  • ui.core.js

NameType

{{{1}}}
NameType

NameType
Example:
Basic Example of a sortable.

$("#myList").sortable({});

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
  $(document).ready(function(){
    $("#myList").sortable({});
  });
  </script>
  <style>ul { list-style: none; }
li { background: #727EA3; color: #FFF; width: 100px; margin: 5px; font-size: 10px; font-family: Arial; padding: 3px; }</style>
</head>
<body>
  
<script src="http://ui.jquery.com/latest/ui/ui.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/ui.sortable.js"></script>
<ul id="myList">
	    <li>Item 1</li>
	    <li>Item 2</li>
	    <li>Item 3</li>
	    <li>Item 4</li>
</ul>

</body>
</html>


NameType

NameType
Demos:

NameType