Reputation: 1126
I'm using http://www.brainjar.com/asp/dirlist/ ( example: http://www.brainjar.com/asp/dirlist/demo.asp ) to list a directory we use to upload some things clients need.
I would like to make it list the folders only and opening them with a click instead of showing everything off.
How can I do that ?
Upvotes: 0
Views: 92
Reputation: 114417
Use this CSS in your page:
ul ul {
display:none;
}
And add jQuery to your page and this script:
$(function(){
$('ul li b').on('click', function(){
$(this).next('ul').toggle()
})
})
Upvotes: 1