dabeng / OrgChart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
2.83k stars 768 forks source link

Uncaught TypeError: $(...).orgchart is not a function #654

Closed valentinomariotto closed 1 year ago

valentinomariotto commented 2 years ago

Hi! I keep getting this error. I made sure that the jquery.orgchart.js is loaded (using console.log('blah');). JQuery 3.5.1 is also loaded.

This is how I'm calling orgchart:

var oc = $('#affiliates_tree').orgchart({
                'data' : datascource,
                'nodeId': 'id',
                'nodeTitle': 'name',
                'nodeContent': 'rank' });

The package was installed in Laravel with npm and it's loaded in the document \<head> using the app.blade.php file.

valentinomariotto commented 2 years ago

fixed by downloading the source from this repo. The files installed by npm were different