2009-01-16 22:51:08 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title>jQuery UI Sortable - Display as grid</title>
|
2010-02-16 01:38:23 +00:00
|
|
|
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
|
2010-01-27 12:29:43 +00:00
|
|
|
<script type="text/javascript" src="../../jquery-1.4.1.js"></script>
|
2009-09-17 10:39:12 +00:00
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
2009-12-16 22:20:18 +00:00
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
2009-12-22 19:51:24 +00:00
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
|
2009-09-17 10:39:12 +00:00
|
|
|
<script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
|
2009-01-16 22:51:08 +00:00
|
|
|
<link type="text/css" href="../demos.css" rel="stylesheet" />
|
|
|
|
<style type="text/css">
|
|
|
|
#sortable { list-style-type: none; margin: 0; padding: 0; }
|
2009-02-27 16:57:26 +00:00
|
|
|
#sortable li { margin: 3px 3px 3px 0; padding: 1px; float: left; width: 100px; height: 90px; font-size: 4em; text-align: center; }
|
2009-01-16 22:51:08 +00:00
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
$("#sortable").sortable();
|
2009-03-02 12:10:59 +00:00
|
|
|
$("#sortable").disableSelection();
|
2009-01-16 22:51:08 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="demo">
|
|
|
|
|
|
|
|
<ul id="sortable">
|
|
|
|
<li class="ui-state-default">1</li>
|
|
|
|
<li class="ui-state-default">2</li>
|
|
|
|
<li class="ui-state-default">3</li>
|
|
|
|
<li class="ui-state-default">4</li>
|
|
|
|
<li class="ui-state-default">5</li>
|
|
|
|
<li class="ui-state-default">6</li>
|
|
|
|
<li class="ui-state-default">7</li>
|
|
|
|
<li class="ui-state-default">8</li>
|
|
|
|
<li class="ui-state-default">9</li>
|
|
|
|
<li class="ui-state-default">10</li>
|
|
|
|
<li class="ui-state-default">11</li>
|
|
|
|
<li class="ui-state-default">12</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div><!-- End demo -->
|
|
|
|
|
|
|
|
<div class="demo-description">
|
|
|
|
|
2009-01-20 13:12:22 +00:00
|
|
|
<p>
|
|
|
|
To arrange sortable items as a grid, give them identical dimensions and
|
|
|
|
float them using CSS.
|
|
|
|
</p>
|
2009-01-16 22:51:08 +00:00
|
|
|
|
|
|
|
</div><!-- End demo-description -->
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|