[Solved] zTree Error: cannot read property ‘init’ of undefined

As the name suggests, undefined methods are used, and most of them do not read the corresponding methods

First of all, according to the online statement, check whether jquery.js has been referenced many times, and it has not been checked

Then jquery.js is put at the front. After doing so, it still can’t be solved

Another way is to use required. JS to implement dependency loading, which I didn’t try

Finally, I put the ztree related code in the window. Load method and execute it after the page is loaded

Solved the problem

Similar Posts: