jsTree - Setting href attributes in Json data

柔情痞子 提交于 2019-12-04 18:36:54

So... I'm not sure that's entirely correct. You can't control the anchor attributes as far as I know, but what you can do add stuff to the attr hash in the json and then use the select_node.jstree event to open the desired link, i.e:

.bind("select_node.jstree", function (e,data) {
   var href_address = data.rslt.obj.attr("whatever");
   // open desired link
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!