Question

How can I change Url for ajax response for children?

E.g. I have

onLazyRead: function (node) {
          $.ajax({
            url: "http://google.com"
            ...
})

and load any children. I want by clicking on children click also load by ajax, but from another action, not from "http://google.com". How can I change it for children nodes?

Was it helpful?

Solution

you can add url (or whatever you want) property to your child nodes and use as

onLazyRead: function (node) {
          $.ajax({
            url: node.data.url
            ...
})
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top