Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:40:07+00:00 2026-06-01T03:40:07+00:00

So I am trying to have a div slideToggle when this link is clicked.

  • 0

So I am trying to have a div slideToggle when this link is clicked. And the slideToggled div “should” push down the div’s below it when it toggles. But it seems to just barely slide or slide behind the divs below when i toggle it. Idk why it is doing this.

Here is the index:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Johnny Edick's Portfolio</title>
<link rel=StyleSheet href="styles.css" type="text/css" >
<script src="js/jquery-1.7.1.js" type="text/javascript"></script>

<script type="text/javascript">
            $(function() {

                $("#nav a.expand").click(function() {
                    $('#contactForm').slideToggle('900');

                });
            });

        </script>
</head>

<body>
    <div id="wrapper">

        <div id="header">
            <img src="images/logo/nameBlue.png" title="name"/>
            <div id="nav">
                <ul>
                <li><a href="">about</a></li>
                <li><a href="">work</a></li>
                <li><a href="" class="expand">contact</a></li>
                </ul>
            </div>
            <div id="logo">
                <img src="images/logo/logoCalligraphy.png" />
            </div>
        </div>
        <div id="contactForm">contact</div>
        <div id="content" class="topImage">
            <div id="tagLine" class="roundedCorners">
            <img src="images/tagLine.png" />
            </div>
        </div>
        <div id="recentWork"></div>

    </div>
</body>
</html>

And here is the stylesheet

@charset "utf-8";
/* CSS Document */
body {
    background-color: #e4e4e4;
    /*background-image:url(../../Pictures/paperTextures/bg-pixelated-lightgray.jpg);*/
    font: 16px/26px Georgia, "Times New Roman", Times, serif;
    margin:0;
padding:0;
}
.roundedCorners{
    -moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px; /* for old Konqueror browsers */
}
#wrapper {
    width: 800px;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
    position:relative;
    top:0;
}

#header {
    width:800px;
    float:left;
    margin-bottom:5px;
    /* background-color: #685c58;    */
}
 img[title="name"]{
     padding-top: 50px;
     float: left;
 }

#logo {
    float: right;
    position:relative;
    top:0;
    right:0;
}

#nav {
    width: auto;
    float: left;
    margin-top: 60px;   
    margin-left: 50px;
}
ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    float: left;
    width: 350px;
    }

ul li{
float: left;    
}
ul a {
    display:block;
    padding: 0 2em;
    text-decoration: none;
    color:#000;
}
.topImage{
    background: url(images/top.png) no-repeat left top;

}
#contactForm {
    background: blue;
    width: 800px;
    height:600px;
    float:left;
    display:none;
    overflow:visible;
}
.expand{}
#content {
    width: 780px;
    float: left;
    padding-top: 20px;
    padding-left: 20px;
    padding-left: 20px; 
    background-color: #fff;
}
#tagLine {
    width: 760px;
    height: 250px;
    float: left;
    background: #97a3a7;
}
#recentWork {
    width: 800px;
    background-color:#ffffff;
    float: left;
    height: 300px;
}
#logo {
    margin-top: 0px;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:40:09+00:00Added an answer on June 1, 2026 at 3:40 am

    I tested it here http://jsfiddle.net/yVNBM/ and it works pretty good to me.

    I think you problem was that you need e.preventDefault(); on the contact and href=”#” instead of just href=””

    Also, try using the latest jQuery (1.7)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery: $(this).closest('div.mcoup').find('div.delcoup').slideToggle(400) .siblings().children('div.delcoup').slideUp(400); What I'm trying to do is get
I am trying to: click on the link shown below and have the value
I am trying to have a link appear on mouseover and when clicked, have
I am trying to have a resizable on a div, but the resizer handle
I'm trying to have a div's left property change by its self - one
I was trying to have a specific div fade in (left_panel_fade), and stay visible
I have a DIV element with a background image and I am trying to
I am trying to have an advertisement block/div that will be switched to a
I have a div that is created by Ajax with .append(html) function, I'm trying
I am trying to have a table header, in a seperate div stay in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.