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 8365479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:39:58+00:00 2026-06-09T12:39:58+00:00

Everything is working here but my animation isn’t displaying properly. I want the toggle

  • 0

Everything is “working” here but my animation isn’t displaying properly. I want the toggle button to move up in position while the navigation disappears, but the “slow” isn’t working.

JQuery:

//Close and open
$(document).ready(function(){
$(".open, .close").click(function(){
    $(".navigation").slideToggle("slow");
    $(".open").toggle();
    $(".close").toggle();
    $(".navigation").css("display","inline");
    $(".collapse").toggleClass("collapse-closed","slow");
  });
});

CSS

.open{
    display:block;
    margin: 12px auto 0px;
    padding:0px;
    width: 0; 
    height: 0; 
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 13px solid #9b9b9b;
    transition: all 0.3s;
    -moz-transition: all 0.3s; /* Firefox 4 */
    -webkit-transition: all 0.3s; /* Safari and Chrome */
    -o-transition: all 0.3s; /* Opera */
    cursor: pointer;
}
.open:hover{
    border-top: 13px solid #A70400;
    }
.close{
    display:none;
    margin: 10px auto 0px;
    padding:0px;
    width: 0; 
    height: 0; 
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 13px solid #9b9b9b;
    transition: all 0.3s;
    -moz-transition: all 0.3s; /* Firefox 4 */
    -webkit-transition: all 0.3s; /* Safari and Chrome */
    -o-transition: all 0.3s; /* Opera */
    cursor: pointer;
}
.close:hover{
    border-bottom: 13px solid #A70400;
}
.collapse {
    background-color: #f6f6f6;
    border-radius: 4px;
    border: 1px solid #919191;
    -moz-box-shadow: 0 2px 4px #bdbdbd;
    -webkit-box-shadow: 0 2px 4px #bdbdbd;
    box-shadow: 0 2px 4px #bdbdbd;
    z-index:8;
    width: 46px;
    height: 36px;
    margin-bottom: -40px;
    right: 20px;
    position: fixed;
    top: 24px;
}
.collapse-closed {
    top: -8px;
}

.navigation {
    border-bottom: 1px solid #919191;
    -moz-box-shadow: 0 2px 4px #bdbdbd;
    -webkit-box-shadow: 0 2px 4px #bdbdbd;
    box-shadow: 0 2px 4px #bdbdbd;
    position: fixed;
    z-index: 7;
    background-color: #f6f6f6;
    width: 100%;
    margin: 0 auto;
    line-height: 0em;
    padding-top: 10px;
    padding-bottom: 10px;
}

.navigation ul {
    text-align: center;
    line-height: 0;
    margin: 10px 0;
}

.navigation ul li {
    display: inline;
    border-top-style: none;
    padding-top: 5px;
    padding-bottom: 5px;
    transition: all 0.5s;
    -moz-transition: all 0.5s; /* Firefox 4 */
    -webkit-transition: all 0.5s; /* Safari and Chrome */
    -o-transition: all 0.5s; /* Opera */
    border-bottom: 4px solid rgba(167, 4, 0, 0);
    margin-right: 8px;
    margin-left: 8px;
}

.navigation ul li:hover,
.navigation ul li:active {
    display: inline;
    border-bottom: 4px solid #A70400;
}

.navigation li a {
    text-decoration: none;
}

HTML

<div class="navigation">
        <ul>
            <li><a href="#ems">About Me</a></li>
            <li><a href="#ems">Writing Samples</a></li>
            <li><a href="#ems">Musings</a></li>
            <li><a href="#ems">Books</a></li>
        </ul>

    </div>
    <div class="collapse">
        <div class="open"></div>
        <div class="close"></div>
    </div>

Am I blocking the transition speed somehow?

Thanks!

  • 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-09T12:40:00+00:00Added an answer on June 9, 2026 at 12:40 pm

    Add the jQuery UI to your page and it’ll allow you to animate class changes (use UI 1.8.22 for jQuery 1.8). Your code will work fine with the UI extension.

    Fiddle

    Without the UI you can’t animate class changes. You could replace those class changes with animate() passing the top property, like this:

    $(".collapse").animate({top: ($('.collapse').css('top') === '-8px') ? 24 : -8}, 'slow');
    

    Fiddle

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

Sidebar

Related Questions

I am sending email from my iPhone application. Everything working fine, but I want
Here is my code, everything is working fine the only problem is with the
I have createn an app, this app can be found here Everything is working
I can't get my dojo working. I've tried everything. Here is the code: <!DOCTYPE
I have wrote a custom MultipleChoiceField. I have everything working ok but when I
This is probably a naive question here but I'll ask it anyway. I'm working
Please refer to my prior question here about implementing drag/drop. I got everything working
I'm working with the Google Maps Geocoder. I've got everything working fine, but I
I am working on a UIPickerController. I have everything working but when I tap
I added a modalView to my App, everything working fine, but on closing the

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.