I have found a lot plugins that can display nested JSON on a desktop ,like jTree. They works well in a full desktop environment, but when run on mobile phones, there are some problems. Generally, the line is sometimes too long, or in short, it’s ugly.
So, I want to display it in a jQuery Mobile nested list (like our mobilephones filemanager.)
Is there some jQuery Mobile plugin(s) or some other solutions I can use to achieve this?
The standard release of JQuery Mobile 1.2 has Nested Lists (similar to browsing a file manager on a smartphone i.e. click on directory and it brings up more directories and files)
http://jquerymobile.com/demos/1.2.0/docs/lists/lists-nested.html
via Serverside Script
You could create a single script page that dynamically loads the JSON node as a parameter within
$.mobile.changePage(). You should be able to create the current view of the tree from this.via Javascript DOM
If you’re doing this by updating the DOM with javascript, I believe after you have updated the DOM with the current view of your JSON tree, you have to run
$('#mylist').listview('refresh')to update the styling.