jQuery UI Draggable instance() Method
jQuery UI is the best tool for building UI interfaces for the webpages. It can also be used to build highly interactive web applications or can be used to add widgets easily.
In this article, we will be using the jQuery UI Draggable instance() method to retrieve the draggable’s instance object. If the element does not have any associated instance, “undefined” is returned. It does not accept any parameter for functioning.
var Instance = $( ".selector" ).draggable( "instance" );
Parameter: This method does not accept any parameter.
Return type: This method returns an object value that contains the draggable’s instance object.
CDN Link: Add the following jQuery Mobile scripts that will be needed for your project.
<link rel=”stylesheet” href=”https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css”>
<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>
Example: This example demonstrates the jQuery UI Draggable instance() method.
Please Login to comment...