How to create a playlist tree view with JQuery?
I already had a look at jstree
and treeview
but correct me if im wrong they are only for a navigation system. I want 开发者_开发问答to create a tree view in a page of content. I added an image of what im looking to do. It is meant to be playlist of podcasts. Can you help me understand how to do this or is there a plugin that can do this? Thanks
If you want a simple version that fits your needs, it's often a good idea to fiddle around: http://jsfiddle.net/JJAqZ/1/.
$('#main > li > *').hide(); // Hide all initially
$('li').click(function(e) { // Open child list on click
$(this).find('ul').toggle();
return false;
});
The jsTree (jQuery tree plugin) allows to build a navigation tree based on the folder path you provide.
If you want to build a custom tree (not navigation tree), you can use the Dynatree jQuery plugin, which contains a good set of features to build dynamic html tree views.
精彩评论