<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="jquery-ui.css">
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<style>
#draggable { width: 150px; height: 150px; padding: 0.5em; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ appendTo: "body", containment: "table", cursor: "crosshair" });
});
</script>
</head>
<body>
<table style="height:500px;width:500px;" border="2" id="table">
<tr><td>
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</td></tr>
</table>
</body>
</html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="jquery-ui.css">
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<style>
#draggable { width: 150px; height: 150px; padding: 0.5em; }
</style>
<script>
$(function() {
$( "#draggable" ).draggable({ appendTo: "body", containment: "table", cursor: "crosshair" });
});
</script>
</head>
<body>
<table style="height:500px;width:500px;" border="2" id="table">
<tr><td>
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</td></tr>
</table>
</body>
</html>
No comments:
Post a Comment