Me podrían ayudar hacer ese botón?
Ejecmplo: http://n9000241.ferozo.com/tree/
Código HTML:
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Pure CSS Tree</title> <link href="tree.css" type="text/css" rel="stylesheet" /> <script src="jquery-1.11.3.min.js" type="text/javascript" > </script> <script type="text/javascript"> $( document ).ready( function( ) { $( '.tree li' ).each( function() { if( $( this ).children( 'ul' ).length > 0 ) { $( this ).addClass( 'parent' ); } }); $( '.tree li.parent > a' ).click( function( ) { $( this ).parent().toggleClass( 'active' ); $( this ).parent().children( 'ul' ).slideToggle( 'fast' ); }); $( '#all' ).click( function() { $( '.tree li' ).each( function() { $( this ).toggleClass( 'active' ); $( this ).children( 'ul' ).slideToggle( 'fast' ); }); }); }); </script> </head> <body> <div class="content"> <button id="all">CAMBIAR VISTA</button> <ul class="tree"> <li><a>Parent 1</a></li> <li><a>Parent 2</a></li> <li> <a>Parent 3</a> <ul> <li> <a>1st Child of 3</a> <ul> <li><a>1st grandchild</a></li> <li><a>2nd grandchild</a></li> </ul> </li> <li><a>2nd Child of 3</a></li> <li><a>3rd Child of 3</a></li> </ul> </li> <li> <a>Parent 4</a> <ul><li><a>Parent 4's only child</a></li></ul> </li> </ul> </div> </body> </html>