如何重新加载/刷新/重新启动DynaTree? [英] how to reload/refresh/reinit DynaTree?

查看:225
本文介绍了如何重新加载/刷新/重新启动DynaTree?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行以下操作时

$('#tree').dynatree("option","initAjax",{url:"http://google.com"});

我希望dynatree忘记当前的树数据,并使用指定网址中的新数据重新加载。但我发现默认情况下不会这样做。

I want dynatree to forget about current tree data and reload with new data from the specified url instead. But I find it does not do that by default.

谢谢。

推荐答案

查看 tree.reload()方法,它应该做你想要的。

look at the tree.reload() method, it should do what you are after.

见这里的文档: http://wwwendt.de/tech/dynatree /doc/dynatree-doc.html#h8.2

在文档中,树是树的内部图纸,你得到它通过调用getTree命令: $(#node)。dynatree(getTree)

as in the docs, the tree is the internal drawing of the tree, and you get it by calling the getTree command: $("#node").dynatree("getTree")

这篇关于如何重新加载/刷新/重新启动DynaTree?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆