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

  • Home
  • SEARCH
  • 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 1027721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:16:47+00:00 2026-05-16T12:16:47+00:00

using jstree, i use the next code to Trigger click , but , i

  • 0

using jstree, i use the next code to Trigger click , but , i can not see the defalut click event, like : the blue background when i click ,

this is my code :

<div id="wrap">
    <div id="header">header</div>
    <div id="main">
        <div id="demo1" style="float:left;width:50%;">
            <ul>
                <li>
                    <a id='a' href="">aaa</a>
                    <!-- UL node only needed for children - omit if there are no children -->
                    <ul>
                        <li><a id="a_1" href="#"> bbb</a></li>
                        <li><a id="a_2" href="#"> ccc</a></li>
                    </ul>
                </li>
            </ul>

        </div>
        <div id="content">www</div>
    </div>
</div>

<div id="footer">
    footer
</div>
<script type="text/javascript">
    $(function () {
    $("#demo1").jstree({
        "themes": {
        "theme": "default",
        "dots": true,
        "icons": true,
        "url": "themes/default/style.css"
      },

        "plugins" : [ "themes", "html_data" ]
    });
    $('#a_1').click(function(){
            $('#content').html('bbb \'s content')
            //return false;
        })
    $('#a_2').click(function(){
            $('#content').html('ccc \'s content')
            //return false;
        })
});
</script>

i find some code like this :

.bind("create.jstree", function (e, data) {
            alert(data)
        })

its mean is : alert data when someone cerate a new file ,

so

does jstree has a method like “click.jstree” ?

thanks

  • 1 1 Answer
  • 2 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-05-16T12:16:48+00:00Added an answer on May 16, 2026 at 12:16 pm

    What you have is fine on the events side, you’re just missing a plugin…in the new 1.0 model the ui bits are a separate plugin, if you just change your plugins from this:

    "plugins" : [ "themes", "html_data" ]
    

    To this:

    "plugins" : [ "themes", "html_data", "ui" ]
    

    You’ll get the current node selection coloring, you can give it a try here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code: $("#treeview").jstree(); $("#treeview").jstree('open_all'); With the following html: <div id="treeview">
I am using jsTree for creating a documentation list index. I use JSON to
I'm using jsTree and I need to convert this HTML tag tree code <ul>
I'm using jsTree 1.0. And have this code : $(document).ready(function () { $(#folders_tree).jstree({ core:
Using jsTree (pre1.0_fix_1), I would like to obtain a list of id 's for
Am using jsTree + PHP, and I would like to load up two different
Can I somehow insert a table inside <li> when using jsTree (1.0) and json?
I am using JSTree with ASP.net. The html generated for the tree looks like
how can I run ruby code inside javascript in haml? if I use var
Can anyone see my syntax error? The jsTree just wouldn't render. plus a strange

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.