Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet">
- <style type="text/css">
- #draggable{
- width: 100px;
- height: 100px;
- background-color: blue;
- }
- #droppable{
- width: 500px;
- height: 500px;
- background-color: red;
- }
- </style>
- </head>
- <body>
- <div id="draggable"> </div>
- <div id="droppable"></div>
- <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
- <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>
- <script type="text/javascript">
- $( "#draggable" ).draggable();
- $( "#droppable" ).droppable({
- drop: function( event, ui ) {
- alert("droppable");
- }
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement