Results 1 to 4 of 4

Thread: Collapsible Right Column

  1. #1
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Collapsible Right Column

    Good day everyone.

    I am trying to have a collapsible column inside the canvas very similar to what's on the homepage of this forum here http://www.dynamicdrive.com/forums/ (Blog entries column). I would like it to collapse (from left to right as well and have collapsible inside panels. Is there a script on this website that can help me achieve this. I have tried a couple of jQuery scripts but none really does what I want.. Any assistance will be greatly appreciated. P.S I don't know javascript that well

    Regards,

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    You can do it with a simple display:block; / display:none; JavaScript switch.

    Something like;
    Code:
    <script>
    function showhide(id){
    	var e = document.getElementById(id);
    	e.style.display = (e.style.display != 'none' ? 'none' : 'block'); 
    	}
    </script>
    
    
    
    [<a href="#" style="text-decoration:none" onclick="showhide('block-01');this.innerHTML=(this.innerHTML=='+')?'-':'+';">+</a>]
    <div id="block-01">
    	<p>blah</p>
    	<p>blah</p>
    	<p>blah</p>
    </div>
    If you need more help, please provide a link to your page.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Jquery:
    Code:
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>slide demo</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <style>
    #toggle {
    width: 150px; border: 1px solid black; padding: 10px ;
     }
    </style>
    
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    
    </head>
    <body>
     
    <p id="toggle_it">TOGGLE BOX</p>
    <div id="toggle">
    aa<br>
    bb<br>
    cc<br>
    </div>
     
    <script>
    $('#toggle_it').click(function() {
    $( "#toggle" ).toggle( "slide" );
    });
    </script>
     
    </body>
    </html>

  4. #4
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot for your responses. I will give it a try. I will come back If I done get it right. Thanks again

Similar Threads

  1. 3rd Column
    By anecdcote1 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 04-10-2010, 02:18 PM
  2. Animated Collapsible DIV in multi-column layout
    By octokitty in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-26-2008, 05:09 PM
  3. Adding a column to 3-column fixed layout
    By slobjones in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 10-21-2007, 03:51 AM
  4. Animated Collapsible DIV - Collapsible DIVs inside collapsible DIV
    By ekin in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-26-2007, 02:03 AM
  5. Removing 1 column from 3 column layout
    By finkdawg5 in forum HTML
    Replies: 1
    Last Post: 12-29-2006, 11:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •