删除jsTree中的所有节点 [英] Delete all nodes in jsTree

查看:783
本文介绍了删除jsTree中的所有节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以比从所有树中删除所有节点更快地清除jsTree中的所有节点?

Is there a way to clear out all nodes from a jsTree that's faster than walking through all the nodes deleting them one-by-one?

推荐答案

在此处查看文档: http://www.jstree. com/documentation/core

.delete_node(节点)

.delete_node ( node )

删除节点.触发事件.

mixed node

这可以是DOM节点,jQuery节点或指向 您要删除的元素.

This can be a DOM node, jQuery node or selector pointing to the element you want to remove.

似乎您只需要执行一个选择器即可删除所需的所有节点,而无需循环.

It seems you can just do a selector that will delete all the nodes you want, no loops required.

这篇关于删除jsTree中的所有节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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