jquery-ui/tests/visual/tree.html
2008-09-20 17:42:04 +00:00

100 lines
2.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="../../jquery-1.2.6.js"></script>
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.droppable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../../../branches/1.8/ui.tree.js"></script>
<script>
$(document).ready(function(){
$("ul.sortable").tree({
sortOn: "li",
dropOn: ".folder",
dropHoverClass: "hover"
});
});
</script>
<style type="text/css">
body {
background:#fff;
color:#333;
font-size:11px;
font-family:"lucida grande", tahoma, verdana, arial, sans-serif;
}
.hover {
background: green;
color: #fff;
}
.placeholder {
display: none;
}
.hover-up {
border-bottom: 2px solid black;
}
.hover-down {
border-top: 2px solid black;
}
.folder {
border: 1px solid black;
}
li {
padding: 3px;
}
</style>
</head>
<body>
<ul class="sortable">
<li><div class="folder">Item 1</div></li>
<li><div class="folder">Item 2</div>
<ul>
<li>Sub Item 1</li>
<li>Sub Item 3</li>
<li>Sub Item 4</li>
<li>Sub Item 5</li>
</ul>
</li>
<li><div class="folder">Item 3</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 4</div></li>
<li><div class="folder">Item 2</div>
<ul>
<li>Sub Item 1</li>
<li>Sub Item 3</li>
<li>Sub Item 4</li>
<li>Sub Item 5</li>
</ul>
</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
</ul>
</body>
</html>