- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试实现 jQuery FancyTree http://wwwendt.de/tech/fancytree/demo/带有本地数组数据
引用自 https://code.google.com/p/fancytree/
这是代码。但它不起作用,没有脚本错误。但是树是空的!!!
Even i copied the jQuery, UI versions of the file they using in a demo site. Still nothing works
<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery-ui.custom.js" type="text/javascript"></script>
<link href="ui.fancytree.css" rel="stylesheet" type="text/css" />
<script src="jquery.fancytree.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tree").fancytree({
onActivate: function (node) {
// A DynaTreeNode object is passed to the activation handler
// Note: we also get this event, if persistence is on, and the
// age is reloaded.
alert("You activated " + node.data.title);
},
children: [ // Pass an array of nodes.
{title: "Item 1" },
{ title: "Folder 2", isFolder: true,
children: [
{ title: "Sub-item 2.1" },
{ title: "Sub-item 2.2" }
]
},
{ title: "Item 3" }
]
});
});
</script>
</head>
<body>
<div id="tree">
</div>
</body>
</html>
最佳答案
我注意到 source:[]
是您在 $("#tabTree").fancytree()
初始化调用中初始化树的方式,因此您的示例将是:
<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery-ui.custom.js" type="text/javascript"></script>
<link href="ui.fancytree.css" rel="stylesheet" type="text/css" />
<script src="jquery.fancytree.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tree").fancytree({
onActivate: function (node) {
// A DynaTreeNode object is passed to the activation handler
// Note: we also get this event, if persistence is on, and the
// age is reloaded.
alert("You activated " + node.data.title);
},
source: [ // Pass an array of nodes.
{title: "Item 1" },
{ title: "Folder 2", isFolder: true,
children: [
{ title: "Sub-item 2.1" },
{ title: "Sub-item 2.2" }
]
},
{ title: "Item 3" }
]
});
});
</script>
</head>
<body>
<div id="tree">
</div>
</body>
</html>
顺便说一句,万一你注意到了,文档非常困惑,因为他们正在重构代码,文档是 dynatree 和 fancytree 的新约定剩下的一半。所以期待更多像这样的奇怪的东西:-)
关于javascript - 带有本地数组数据的 jQuery Fancy Tree,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14877996/
我对花式索引的行为有点困惑,请参阅: >>> t = np.arange(2*2*3).reshape((2, 2, 3)) >>> t array([[[ 0, 1, 2], [
听着;我读了又读,但找不到适合我的问题的答案。 我在我的网站上使用 Fancy Box http://www.houdi.se/video.shtml但有一个问题,即当单击视频链接(其响应)时,花式框
我正在尝试做一些相对简单的事情,那就是在文档加载期间触发 Facnybox jQuery 插件弹出。我正在使用 ASP,但这应该无关紧要。我有以下标签: 在 JavaScript 中我执行以下操作:
1.奇特数字是序列 1、1、5、17、61、... 中的数字 请注意,前两个奇数是 1,除前两个之外的任何奇数都是前一个数字的三倍和前一个数字的两倍之和。请参阅下文: 1, 1, 3*1 +2*1 =
在 emacs 中编辑 clojure 代码时,通常会调整字体锁定以插入 lambdas、sets、anon 函数的“花哨”字符。 这是通过以下一些变体实现的(见 clojure-mode、emacs
这是我的情况的一个工作示例:fiddle 这张图片只是我从谷歌图片中抓取的第一张图片。但无论如何,当您单击图片时,它会再次显示该图片,但标题文本位于其顶部。这是我想要的,但我不想要的是溢出。是否有办法
我正在使用 Fancy tree 来填充树,以便理解显示的代码 var treeData = [{"title":"image_test","folder":true,"children":[{"t
我在这个论坛上进行了多次搜索,但到目前为止我还没有看到答案。而且,我想我开始失去理智了。 可能我只是想念它,因为我不是程序员。我是一名视觉设计师,通常不需要太多就能安装预先编写的代码困难。而且,我确实
这是我第一次在我的项目中实现 FancyBox。我已将图像与链接分开。因此,当您将鼠标悬停在图像上时,会出现查看大图像的链接。那里一切正常。我的问题是单击链接时窗口不断跳转/滚动到顶部。我已经使用 j
我正在尝试实现 jQuery FancyTree http://wwwendt.de/tech/fancytree/demo/带有本地数组数据 引用自 https://code.google.com/
我希望在关闭 Fancy Box 弹出框架时刷新我的父页面。我在弹出窗口中有一个登录页面,因此我需要刷新父页面以在 Fancy Box 关闭时显示新的登录状态。 我可以让它在没有 iFrame 代码
下面是 HTML 代码,我想获取 h4 标签 class="prdtTitle"中提到的图像 src 和图像名称以及 Jquery fancy box 中的图像 src。 我正在使用下面的精美盒子:
我有一个精美的弹出消息框,其中有一个标记为“继续”的按钮。当我单击此按钮时,精美的框将关闭。我想要的是这个。我想单击“继续”按钮,并且希望关闭精美的框(就像当前一样),然后我希望在此之后弹出另一个精美
我有不同的 id 属性值,我需要将其发送到精美的盒子。 $('a.Links').click(function() { var clickID
我有一个网站:http://treethink.treethink.net/所有fancybox iFrame 可以工作,但如果您进入作品集部分,然后单击其中一个链接,它会将您带到一个页面并关闭 Fa
这个问题已经存在: fancybox conflict with SNS share jquery 关闭 8 年前。 $(".fancybox-effects-b").fancybox({
不知道这个效果叫什么。 Fancy 在其应用程序中使用它。它是这样工作的。 您在 ScrollView 的顶部有一张图片。 向下拖动,图像会缩放以填充额外的顶部空间,因此它的上边缘始终保持在此 Scr
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我想在花式框窗口中打开图像...我试过这样做...但这不能正常工作 我试过我的代码如下: $('#show_dialog').click(function() { $.fancybox({
我在使用 jQuery Fancy Zoom 插件时遇到问题。 在我的页面中,我有以下 HTML 片段: 在ProjectImage页面上有: @{ if (Request["I
我是一名优秀的程序员,十分优秀!