我在使用 zTree 库时遇到问题。这是我的代码
<script type="text/javascript" src="<?php echo base_url()?>asset/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>asset/js/jquery.ztree.core-3.5.js"></script>
<SCRIPT type="text/javascript">
<!--
var setting = {
data: {
simpleData: {
enable: true
}
}
};
var zNodes =[
{ id:1, pId:0, name:"Custom Icon 01", open:true, iconOpen:"<?php echo base_url()?>asset/img/diy/1_open.png", iconClose:"<?php echo base_url()?>asset/img/diy/1_close.png"},
{ id:11, pId:1, name:"leaf node 01", icon:"<?php echo base_url()?>asset/img/diy/2.png"},
{ id:12, pId:1, name:"leaf node 02", icon:"<?php echo base_url()?>asset/img/diy/2.png"},
{ id:13, pId:1, name:"leaf node 03", icon:"<?php echo base_url()?>asset/img/diy/2.png"},
{ id:2, pId:0, name:"Custom Icon 02", open:true, iconOpen:"<?php echo base_url()?>asset/img/diy/1_open.png", iconClose:"<?php echo base_url()?>asset/img/diy/1_close.png"},
{ id:21, pId:2, name:"leaf node 01", icon:"<?php echo base_url()?>asset/img/diy/8.png"},
{ id:22, pId:2, name:"leaf node 02", icon:"<?php echo base_url()?>asset/img/diy/8.png"},
{ id:23, pId:2, name:"leaf node 03", icon:"<?php echo base_url()?>asset/img/diy/8.png"}
];
$(document).ready(function(){
$.fn.zTree.init($("#treeDemo"), setting, zNodes);
});
//-->
</SCRIPT>
我得到一些错误,比如
未捕获的类型错误:无法读取未定义(匿名函数)b.extend.ready u 的属性“init”
请帮助我,我该如何解决这个问题?谢谢