Drag and Drop is a very interactive and user-friendly concept which makes it easier to move an object to a different location by dragging it. It allows the user to click and hold the mouse button over an element, drag it to another location, and release the mouse button to drop the element there. In HTML 5 Drag and Drop are much easier to code and any element in it is draggable. Links and images are by default draggable. This feature is mostly enabled on most of the websites. Google is even allowing the users to do an image search using the image drag and drop feature, also known as the image dragging feature.
Method 1: This method sets the dtraggable attribute to false using jQuery.
document.getElementById('myImage').draggable = false;
- How to prevent dragging of ghost image ?
- HTML | Responsive full page image using CSS
- How to disable zoom on a mobile web page using CSS?
- How to redirect a page to another page in HTML ?
- Convert an image into grayscale image using HTML/CSS
- How to get the title of an HTML page ?
- How to use Meta Tag to redirect an HTML page?
- How to add Google map inside html page without using API key ?
- HTML Course | First Web Page | Printing Hello World
- How to minify HTML code of PHP page ?
- How to get title of current HTML page using jQuery ?
- How to design Meet the Team Page using HTML and CSS ?
- How to remove .html extension from URL of a static page ?
- How to trigger onchange event on input type=range while dragging in Firefox ?
- How to select all visible or hidden elements in a HTML page using jQuery ?
- How to display search result of another page on same page using ajax in JSP?
- How to pass form variables from one page to other page in PHP ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.