Destination node during drag event?

2 posts, 0 answers
  1. Kyle
    Kyle avatar
    45 posts
    Member since:
    Mar 2012

    Posted 04 May 2012 Link to this post

    In a TreeView I can add the following:

    .bind("drag", function(e) {

            })

    Which allows me to access the dropTarget, which is a DomElement. How can I go about both determining if this is a tree node, and getting said tree node?
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 09 May 2012 Link to this post

    Hello Kyle,

    var node = $(e.dropTarget).closest(".k-item");

    if (node.length && node.parents(".k-treeview").length) {
        // the dropTarget is within the treeview,
        // `node` is the closest treeview item

    }

    Greetings,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top