hi ivan, thank you for your answer.
i've already done an automatic click on node href. the click itself
works, but the style of the node doesn't change.
i've just tried your 1st solution but nothing happens
On 20 Nov, 15:32, vakata <
ivan.bozha...@gmail.com> wrote:
> Try using this:
>
> $('#listaDocumentale').jstree("select_node", #IDOFTHENODE");
>
> Or you could:
> $("#IDOFTHENODE").children("a").click();
>
> Kindest regards,
> Ivan
>
> Kindest regards,
> Ivan
>
> On 19 îÏÅÍ, 13:29, diegofio <
diego.fio...@gmail.com> wrote:
>
> > hi!
>
> > sorry for my english
>
> > i'm using jstree 1.0 rc3
>
> > i want to select a node in the tree by javascript, simulating a user
> > click.
> > i use JS click() function on href. so the action associated with the
> > node is performed, but i can't see the selected style on the node, in
> > fact it isn't selected.
>
> > then i try with select_node event
> > $('#listaDocumentale').jstree.("select_node", $("#IDOFTHENODE"));
>
> > but still doesn't work.
>
> > this is my jstree config.
>
> > function ricaricajstree(){
> > $(function () {
> > š š š š $("#listaDocumenti").jstree({
> > š š š š š š š š "plugins": ["ui", "themes", "html_data", "search"],
> > š š š š š š š š "ui":
> > š š š š š š š š {
> > š š š š š š š š š š š š "select_limit" : 1
> > š š š š š š š š },
> > š š š š š š š š "themes":
> > š š š š š š š š {
> > š š š š š š š š š š š š "theme" : "classic",
> > š š š š š š š š š š š š "url" : root + "/styles/elise_jstree.css"
> > š š š š š š š š }
> > š š š š })
> > š š š š .bind("search.jstree", function (e, data) {})
> > š š š š .bind("select_node.jstree", function (e, data)
> > š š š š {
> > š š š š š š š š š š š š eval(data.inst.get_selected()[0].lastChild.getAttribute('href'));
> > š š š š })
> > š š š š .bind("loaded.jstree", function (event, data) {
> > š š š š š š š š $("#listaDocumenti").jstree("open_all");
> > š š });