This is a migrated thread and some comments may be shown as answers.

No events on drop area

1 Answer 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alan Mosley
Top achievements
Rank 1
Alan Mosley asked on 07 May 2014, 02:27 PM
I am trying to use the drag and drop framework, but cant seem to get any events on the drop are, such as dragenter.

am I missing something? thanks

‚Äč
<div class="draggable">
    drag me
</div>
<div  id="test-area">
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
    <h2>
        Test area
    </h2>
</div>
 
<script>
 
    $(document).ready(function () {
    
        $("#test-area").kendoDropTargetArea({
            dragenter: DragAndDrop.dropTargetOnDragEnter,
            dragleave: DragAndDrop.dropTargetOnDragLeave,
            drop: DragAndDrop.dropTargetOnDrop
        });
 
        $(".draggable").kendoDraggable({
            hint: function () {
                return $(".draggable").clone();
            },
            dragstart: DragAndDrop.draggableOnDragStart,
            dragend: DragAndDrop.draggableOnDragEnd
        });
 
 
    });
 
 
    var DragAndDrop = {
        draggableOnDragStart: function (e) {
            $(".draggable").addClass("hollow");
            $(".draggable").css("cursor", "no-drop");
            e.currentTarget.hide();
 
        },
        draggableOnDragEnd: function (e) {
            e.currentTarget.show();
 
        },
        dropTargetOnDrop: function () {
            alert(2);
 
        },
        dropTargetOnDragEnter: function () {
            alert(1);
            $(".draggable").css("cursor", "wait");
 
        },
        dropTargetOnDragLeave: function () {
            alert(3);
 
        }
    };
 
 
</script>

1 Answer, 1 is accepted

Sort by
0
Alan Mosley
Top achievements
Rank 1
answered on 08 May 2014, 03:12 AM
Solved
I had "kendoDropTargetArea" where it should have been "kendoDropTarget"
Thanks
Tags
General Discussions
Asked by
Alan Mosley
Top achievements
Rank 1
Answers by
Alan Mosley
Top achievements
Rank 1
Share this question
or