Skip to content
Related Articles

Related Articles

Improve Article Drag & Drop starteffect Option

  • Last Updated : 25 Nov, 2020

This Drag & Drop starteffect Option is used to define the function which is called when a suitable drag-gable element starts being dragged. The function can be used to define any effect.


Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof. But before you tackle the big projects, we suggest you start by learning the basics. Kickstart your web development journey by learning JS concepts with our JavaScript Course. Now at it's lowest price ever!

{ starteffect: effectFunction }


  • effectFunction: This value defines the function that contains the effect to be shown when the drag-gable is being starts being dragged.

The below example illustrates Drag & Drop starteffect Option:



<!DOCTYPE html>
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript">
        window.onload = function () {
                .each(function (item) {
                    new Draggable(item, {
                        revert: true,
                        // Define the effect to be used
                        // when the dragging starts
                        starteffect: function (element) {
                            new Effect.Opacity(element,
                                    from: 0,
                                    to: 1.0,
                                    duration: 5
<body style="text-align: center;">
        <h1 style="color: green">
        <p>A Computer Science Portal
            for Geeks
    <strong> Drag & Drop
        starteffect Option
    <div id="draggables">
        <img src=


My Personal Notes arrow_drop_up
Recommended Articles
Page :