我需要更改我的代码才能从Jstree 1.0-rc3转移到Jstree 3.3.5

时间:2018-01-17 16:12:27

标签: javascript jstree

我需要在我的网站上添加一些新的jstree功能,我发现我使用的是非常旧版本,所以我用最新版本替换了jstree.js,现在使用jstree的现有页面没有呈现为jstree

这是我网页上的jstree javascript,任何人都可以帮我看看为什么这不适用于最新版本的jstree。 (我没有改变JQuery,仍然使用1.92)

我必须承认我不记得这是如何运作的。

   <script type="text/javascript" class="source below">
    $(function () {
      $("#songchanges").jstree({
          "plugins" : ["themes","html_data","ui","cookie"],
          "core" : { "initially_open" : [ "phtml_1" ] }
      })
      .bind("loaded.jstree", function (event, data) {
      })
      .bind("select_node.jstree", function (e, data) {
          var href = data.rslt.obj.children("a").attr("href");
          if(href!="#"){
              top.frames["main"].location = href; }
          else {
              $(this).jstree('toggle_node', data.rslt.obj[0]);
          }
        })
      ;
    });
    </script>

1 个答案:

答案 0 :(得分:0)

问题是我更新了代码以使用最新版本的jstree.ks,但仍然使用旧版本的jstree主题,该版本不适用于最新的jstree.js