jquery-ui/tests/visual/tree.html

100 lines
2.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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>