开发者

How to create a playlist tree view with JQuery?

开发者 https://www.devze.com 2023-03-19 09:12 出处:网络
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

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

How to create a playlist tree view with JQuery?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消