Tuesday, February 5, 2013

Draggable in jQuery User Interface



In jQuery Unser Interface:
http://jqueryui.com
There are a lot of useful demo, such as: Draggable, Droppable, ResizableSelectable, Sortable.
 There are alot of widgets and effects. Example of Draggable:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<style>
#draggable { width: 150px; height: 150px; padding: 2.5em;background-color: blue }
</style>
<script>
$(function() {
$( "#draggable" ).draggable();
});
</script>
</head>
<body>
<div id="draggable" class="ui-widget-content">
<p><br />Drag me around</p>
</div>
</body>
</html>
 Demo: Drag the block around

No comments:

Post a Comment