Fancytree and Backbone

南笙酒味 提交于 2019-12-23 04:48:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!