Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
How do I change my jsTree to only select children when clicked and toggle nodes when clicking on an anchor?

I need a jsTree, which reacts differently to clicks depending on if it is an anchor or a child that is clicked.

  1. If an anchor is clicked, I need the node to open (if closed, and vise verca) and NOT select the node (or children).

  2. If a child is clicked, the checkbox becomes checked.

I have got number one working, but it doesn't allow the children checkboxes to be selected.

Here is my code so far:

$('#tree')
.on('click', '.jstree-anchor', function (e) {
$('#tree').jstree(true).toggle_node(e.target);
$('#tree').jstree(true).deselect_node(data.node);
})"
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!