Skip to content
Related Articles

Related Articles Drag & Drop reverteffect Option

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Mar, 2021
View Discussion
Improve Article
Save Article

This Drag & Drop reverteffect Option is used returns to its defined position when the drag ends. It also specifies whether the reverteffect callback will be invoked when the drag operation stops.


new Draggable('element', {reverteffect: 'effectFunction'});


  • reverteffect: This option takes the reverteffect function.



<!DOCTYPE html>
    <script type="text/javascript" 
    <script type="text/javascript"
    <script type="text/javascript">
        window.onload = function () {
            var img = 'gfg';
            new Draggable('gfg', {
                revert: true,
                reverteffect: function () {
                    new Effect.MoveBy('gfg', 100, 100);
        <h1 style="color: green">
            A Computer Science 
            Portal for Geeks
    <strong> Drag & 
        Drop reverteffect Option
    <p>Drag and leave the image</p>
    <img id="gfg" src="gfg.png">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!