Solved

JQUERY Toggle Div Issue

Posted on 2014-02-07
2
358 Views
Last Modified: 2014-02-07
I am trying to toggle one div, but the collapse keeps coming up short due to a div to the right. How do I get the div to collapse all the way to the top. I am using the gumby framework as well. So what I'm looking for is for the "1. Shipping Information" div to collapse up and the "2. Billing Information" div below it to rise up to be just underneath the collapsed "Shipping Information" div, but the "Checkout Progress" div to the right gets in the way and the "2. Billing Information" stops right below that. Here is the general code:

   
<div class="row">
    	<div class="nine columns">
    		<div id="shipdiv">
    
    			Shipping Information Content
    
    		</div>
    	</div>
    
    	<div class="three columns">
    		<div>
    
    			Checkout Progress Content
    
    		</div>
    	</div>
    </div>
    
    
    
    <div class="row">
    	<div class="nine columns">
    		<div id="billdiv">
    
    			Billing Information Content
    
    		</div>
    	</div>
    
    	<div class="three columns">
    		<div>
    
    			Blank Content
    
    		</div>
    	</div>
    </div>

Open in new window



   
 <script>
    $( "#hide-ship" ).click(function() {
    $( "#shipdiv" ).toggle( "slow" );
    $( "#billdiv" ).toggle( "slow" );
    });
 

   </script>

Open in new window


Example Image
0
Comment
Question by:seeraig
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
Because you have the shipping and side bar in their own row and the billing in another row.
Just move the billing bits inside the same row under shipping.;
0
 

Author Closing Comment

by:seeraig
Comment Utility
thanks, that worked, simple, just missed it.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now