$(selector).on(“drag”,callback) | ondrag Event in Jquery Default

Date Published: 11/05/2020 Published By: JaiSchool

This event keeps executing its anonymous function when the element is dragging. To work on drag event, there should be applied an attribute draggable="true" on the element.


<!DOCTYPE html>
  <title>Jquery on drag event</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<p draggable="true">Drag me</p>


Publish A Comment

Leave a Reply

Your email address will not be published.