Eric Brockman Eric Brockman - 1 year ago 98
jQuery Question

Using .slideToggle to pull a hidden div up from the bottom

I can't seem to figure out how to reveal hidden content from the bottom up as opposed to from the top down. I've done some homework on here and came across a solution from jQuery UI, but must be implementing it wrong. Any help is greatly appreciated - new to scripting.


Here's what I'm working with

the script:

$(document).ready(function() {
$('#clientsOpen').click(function() {
$('#clientsDropDown #clientsDashboard').slideToggle({ direction: "up" }, 300);
}); // end click

the markup:

<div id="clientsDropDown">
<div id="clientsDashboard">
<p id="clientsCTA">Let's make something beautiful together...<br /><a href="mailto:[email protected]">[email protected]</a></p>
</div><!-- /clientsDashboard -->
<p id="clientsOpen">clients</p>
</div><!-- //clientsDropDown -->

The style:

#clientsDropDown {
width: 100%;
z-index: 100;

#clientsOpen {
background: url("images/open.png") no-repeat scroll 68px 10px #414142;
color: #ececec;
cursor: pointer;
float: left;
font-size: 26px;
margin: -2px 0 0 10%;
padding: 0 15px 2px;
text-decoration: none;
width: 63px;

#clientsCTA {
color: #CCCCCC;
font-size: 46px;
margin: 0;
padding: 30px 0;
text-decoration: none;


#clientsDropDown .clientsClose {
background-image: url(images/close.png);

#clientsDropDown #clientsDashboard {
display: none;

Answer Source

Just add position:absolute; to #clientsDropDown.

jsFiddle example

Or if you want "clients" to sit on top of the popup div, remove the float and position the paragraph above the dashboard div like in this jsFiddle example.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download