Skip to content

Instantly share code, notes, and snippets.

@stilian2
Created January 16, 2017 13:37
Show Gist options
  • Save stilian2/5a7cfbdc33131de53371f691ba35af81 to your computer and use it in GitHub Desktop.
Save stilian2/5a7cfbdc33131de53371f691ba35af81 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
#draggable { width: 70px; height: 70px; padding: 0.5em; border-radius: 50%; border: 5px solid red; }
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#draggable" ).draggable();
} );
</script>
</head>
<body>
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment