问题
I am trying to use fancytree in a backbone.js application.
I am getting the following error:
TypeError: $(...).fancytree is not a function
when it hits this line in the backbone.js view:
var myTree = $("#buildingsTree").fancytree({
Any ideas?
Thanks!
回答1:
Make sure you have required the fancytree js files before your view gets loaded, as per https://github.com/mar10/fancytree/wiki#user-content-embed-fancytree-on-your-web-page
Make sure you are using a compatible jQuery version: "Required minimum versions are jQuery 1.7+ and jQuery UI 1.8.6+" https://github.com/mar10/fancytree/wiki#user-content-getting-started
来源:https://stackoverflow.com/questions/26016054/fancytree-and-backbone