acitree


How to get children in Acitree


I used aciTree to view list items. After sorted i want to list all children of parent same level but i can't get them . They're only HTML node li tag. How to return json node.
case 'sorted':
var pr = api.parent(item);
var allChilds = api.children();
var arrChilds = api.children(pr, false, false);
$.each(arrChilds, function(id,child) {
console.log(api.itemData(child)); // here error
});
console.log(api.itemData(item));
break;
you can try the following code:
var api = $("#Tree").aciTree("api");
var allChild = api.children(null, true, true);// you can change null to any node , now it get the whole tree
allChild.each(function (index, item) {
var $item = $(item);
var data = api.itemData($item);// itemData return json object for the selected item.
});
itemData wants an item object, and children returns a list of <li> items. Try this;
$.each(arrChilds, function(id,child) {
var item = api.itemFrom(child);
console.log(api.itemData(item)); // here error
});
var allChild = api.children (item, true, true);
you will get all the childs of item and item is null if you want all childs from root

Related Links

How to get children in Acitree
Get parent Id on checked unchecked event in aciTree

Categories

HOME
knockout.js
opencv-python
hid
websocket
tabs
gentelella
tibco
drag-and-drop
getopenfilename
game-maker
rangy
clish
distributed-computing
mahout-recommender
jaspersoft-studio
substring
ava
backendless
beego
hevc
macromedia
ibm-connections
envoy
winsock
instructions
cloudera-manager
devtools
express-session
subclassing
runtimeexception
identify
django-crispy-forms
fastlane
aurelia-http-client
android-n
assemblies
imgur
angular-datatables
yoast
audio-converter
scala-collections
gnome-terminal
test-data
word-2016
finder
boost-compute
portal
jsonix
livereload
jsf-2.3
jenkins-workflow
node.js-connect
apache-pig-grunt
mathnet
jeditable
distributed-cache
django-validation
lovefield
google-maps-api-2
blockquote
console.log
scala-macros
sablecc
sql-processor
operands
thoughtworks-go
maven-central
commenting
fileshare
nodeload
gpu-programming
ctp
pbkdf2
non-ascii-characters
codahale-metrics
django-facebook
objective-c-runtime
jacob
unicoins
msinfo32
pageheap
wiktionary
multidrop-bus
delphi-prism
data-dump
getopts
nsrangeexception
anonymous-types
turbine
principles
asdoc
fxruby
downcasting
community-server

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App