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 6954081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:33:36+00:00 2026-05-27T14:33:36+00:00

Can anyone see my syntax error? The jsTree just wouldn’t render. plus a strange

  • 0

Can anyone see my syntax error?
The jsTree just wouldn’t render.

plus a strange error in jquery 1.7:

Uncaught Error: Syntax error, unrecognized expression: #

var data = [
    {
    "data": "Basics",
    "state": "closed",
    // omit `attr` if not needed; the `attr` object gets passed to the jQuery `attr` function
    "attr": { "id": "1234", "some-other-attribute": "attribute_value" },
    "children": [{
        "data": "login",
        "state": "closed",
        "children": [
        {
            "data": "results",
            "state": "closed",
            "attr": { "id": "node-123" }
        }]
    }]
}];

$(function () {
    $("#jstree").jstree({
        "json_data": {

            //initial - demo only, usually takes json from the controller
            //static data, or function(node, mappingBeforeRequestToserver)
            "data": data,


            //If both data and ajax are set the initial tree is rendered from the data string. 
            //When opening a closed node (that has no loaded children) an AJAX request is made.
            "ajax": {

                //data: mappingBeforeRequestToserver-function(node about to be open or -1).  `this` will be the tree instance) 
                //url: function(node about to be open as a paramater or -1) retuns the ajax URL (like /get_children/node_2).
                //The error and success functions- modifiying the results from the server before populating the tree  



                type: "POST",
                async: true,
                "url": "/echo/json/",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                cache: false,
                success: function (msg) {
                    return msg;
                },
                error: function () {
                    // TODO process error
                }
            },
//          "xsl": "flat",
//          "override_ui": "true",
//          "real_checkboxes": "true",
            "plugins": ["themes", "json_data", "ui"]
        }
        // 1) if using the UI plugin bind to select_node
    }).bind("select_node.jstree", function (event, data) {
            // `data.rslt.obj` is the jquery extended node that was clicked
            alert(data.rslt.obj.attr("id"));
        })
});
  • 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-05-27T14:33:37+00:00Added an answer on May 27, 2026 at 2:33 pm

    Found it: an extra } after

    “plugins”: [“themes”, “json_data”, “ui”]

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

Sidebar

Related Questions

Can anyone see anything wrong with this login script: public function login($username, $pass, $remember)
Trying to convert the following but am having difficulty. Can anyone see where I'm
I'm at my wit's end with this. Can anyone see anything wrong with this
Does anyone know how I can check to see if a directory is writeable
Does anyone have experience using the URL Rewrite Module (see here )? Can it
I am getting the following error message in my FF console: uncaught exception: Syntax
I'm getting a syntax error on this query, but I can't figure it out.
Can anyone see why this isn't working? $category = 1; $CategoryResult = mysql_query(SELECT *
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone tell me how I can display a status message like 12 seconds

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.