Create Draggable DOM element Using jQuery


Create Draggable DOM element Using jQuery

Please check this following example.

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery Draggable</title>
  <link rel="stylesheet" href="">
  #draggable { width: 150px; height: 150px; padding: 0.5em; border:0}
  <script src=""></script>
  <script src=""></script>
  $( function() {
    $( "#draggable" ).draggable();
  } );
<div id="draggable" class="ui-widget-content">
  <img src=""/>

Please check the output:


How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?