TypeError: $(...).jstree is not a function

6,865 views
Skip to first unread message

Andy Felix

unread,
May 14, 2014, 10:26:55 AM5/14/14
to jst...@googlegroups.com
Hi,

i implement the jstree from demopage and i get following error:
TypeError: $(...).jstree is not a function

this is my demo code:

                <div id="plugins1" class="demo plugin-demo">
                    <ul>
                        <li data-jstree='{"opened":true}'>Root node
                            <ul>
                                <li>Child node 1</li>
                                <li>Child node 2</li>
                            </ul>
                        </li>
                    </ul>
                </div>

and in the js-file:
$("#plugins1").jstree({
                "checkbox" : {
                    "keep_selected_style" : false
                },
                "plugins" : [ "checkbox" ]
            });

could you please help me, what is the mistake? i have included the jstree.js, jquery.

thanks and kind regards,
andy

Andy Felix

unread,
May 15, 2014, 2:06:24 AM5/15/14
to jst...@googlegroups.com
Good Morning Ivan,
 
 thanks for your answer. I think the order is now correct of the files, i get now another error - in jstree.js:
 
TypeError: $.expr.createPseudo is not a function
 
Have you please an idea?
 
thanks and best regards,
Andy

Ivan Bozhanov

unread,
May 15, 2014, 2:39:59 AM5/15/14
to jst...@googlegroups.com
You are using an old version of jQuery, you need at least 1.9.1.

Cheers,
Ivan

Andy Felix

unread,
May 15, 2014, 3:14:03 AM5/15/14
to jst...@googlegroups.com

thanks for your help, that was the reasen.... i had version 1.7.2....... now it works.

i hope that i can ask you again, if i have further questions....
 
kind regards,
andy
 

Ivan Bozhanov

unread,
May 14, 2014, 10:36:30 AM5/14/14
to jst...@googlegroups.com
Include jQuery first, then jstree (jstree.js from the "dist" folder).

Best regards,
Ivan
Reply all
Reply to author
Forward
0 new messages