Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9324515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:37:08+00:00 2026-06-19T04:37:08+00:00

In my jstree I have a Root node which is the parent node of

  • 0

In my jstree I have a Root node which is the parent node of all. I have used dnd plugin. I want to allow drag and drop anywhere in the tree but only inside the root i.e. not before or after the Root.

- [Root]
   - Node 1
      - Node 1.1
      - Node 1.2
   + Node 2
   - Node 3
      + Node 3.1

After checking with forums I found that drag_check event is for foreign nodes only and not for any node within the tree. To validate for same tree node we need to use crrm -> check_move event. That is where I need help. I want to return false if the node is dropped before or after [Root].

Here is the fiddle to start – http://jsfiddle.net/juyMR/23/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T04:37:10+00:00Added an answer on June 19, 2026 at 4:37 am

    You are very close, you just need a else statement to return true

    http://jsfiddle.net/blowsie/juyMR/59/

     "crrm" : {
            "move" : {
                "check_move" : function (data) {
                   // alert(data.r.attr("id"));
                    if(data.r.attr("id") == "999") {
                        return false;
                    }
                    else {
                        return true;
                    }
                }
            }
        },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement to show the root node in jsTree when using the
I have set up a jstree with drag and drop. For now I am
I have a tree(jstree) inside a div, so when a node gets expanded the
I have a JTree which contains file/directory, i want to get a list which
I have a Jstree populating a list of items. When I click a node
I want write custom TreeCellRenderer to have Root, nodes and leafs in different color.
I have integrated Jstree in my application, now i want to understand different column
I have written a function which scans all the files/directory in a given directory
I'm trying to have the jstree ONLY return the text for the node that
I have a page that contains 8 jstree's, 3 of which are very large.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.