JQuery UI Draggable Example




JQuery UI Draggable Example

Hi Guys,

In this tutorial,I will learn you how to use jquery ui draggable. you can simplay and easy to use jquery ui draggable.

This method allows the elements to be dragged with the help of mouse. Using jQuery UI, we can make the DOM(Document Object Model) elements to drag anywhere within the view port. This can be done by clicking on the draggable object by mouse and dragging it anywhere within the view port.

Example :

<!doctype html>

<html lang="en">


<meta charset="utf-8">

<title>JQuery UI Draggable Example</title>

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

<link rel="stylesheet" href="/resources/demos/style.css">


#draggabled { width: 150px; height: 150px; padding: 0.5em; border:2px solid #008B8B;}


text-align: center;



font-weight: bold;



<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>



<h2>JQuery UI Draggable Example - NiceSnippets.com</h2>

<div id="draggabled" class="ui-widget-content">

<p>Draggable Me</p>



$( function() {






It will help you...

#Jqury UI