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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:39:47+00:00 2026-06-16T19:39:47+00:00

I am working on a menu using jQuery + CSS3. I have an up

  • 0

I am working on a menu using jQuery + CSS3.

I have an up arrow on the right side of the menu and when clicked the menu slides up and the image switches to a down arrow.

The only problem is that if you click the down arrow, it does’t slide back down, even though I’ve provided a somewhat legit piece of code in order for it to work.

I am new to jquery so any help would be very much appreciated!

HTML:

<nav id="tfc-new-nav">
    <div class="wrapper">
        <ul>
            <li><a href="index.html">Home</a></li>
            <li><a href="contact.html">Contact</a></li>
            <li><a href="cart.html">Shopping Cart</a></li>
            <li><a href="login.html">My Account</a></li>
        </ul>
    </div>
    <div class="hide-menu menu-active"></div>
</nav>​

CSS:

.wrapper {
    display: block;
    height: 100%;
    width: 1000px;
    position: relative;
    margin: 0 auto;
}

#tfc-new-nav {
    display: block;
    height: 45px;
    width: 100%;
    background: #808E91;
    position: relative;
    top: 50px;
}

#tfc-new-nav ul {
    list-style: none;
}

#tfc-new-nav ul li {
    display: block;
    height: 45px;
    width: 10%;
    float: left;
    text-align: center;
    line-height: 45px;
}

#tfc-new-nav ul li a {
    display: block;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Felix Titling', serif;
    cursor: pointer;
    -webkit-transition: background .3s ease-in;
    -moz-transition: background .3s ease-in;
    -ms-transition: background .3s ease-in;
    -o-transition: background .3s ease-in;
    transition: background .3s ease-in;
}

#tfc-new-nav ul li a:hover {
    background: #50798D;
}

#tfc-new-nav .hide-menu {
    position: absolute;
    top: 20px;
    right: 10px;
    cursor: pointer;
}

#tfc-new-nav .hide-menu.menu-active {
    display: block;
    background-image: url('http://upload.wikimedia.org/wikipedia/commons/6/61/Black_Up_Arrow.png');
    background-size: 100% 100%;
    height: 7px;
    width: 7px;
}

#tfc-new-nav .hide-menu.menu-hidden {
    display: block;
    background-image: url('http://www.wpclipart.com/signs_symbol/BW/direction_arrows/down_arrow.png');
    background-size: 100% 100%;
    height: 7px;
    width: 7px;
}​

JavaScript:

$(document).ready(function() {

    $("#tfc-new-nav .hide-menu.menu-active").click(function() {

        $("#tfc-new-nav").animate({

            top: "30px"

        });

        $(this).removeClass("menu-active");
        $(this).addClass("menu-hidden");

        $(this).animate({
            top: "35px"
        });

    });

    $("#tfc-new-nav .hide-menu.menu-hidden").click(function() {

        $("#tfc-new-nav").animate({

            top: "95px"

        });

        $(this).removeClass("menu-hidden");
        $(this).addClass("menu-active");

        $(this).animate({
            top: "20px"
        });

    });

});​

LIVE DEMO

  • 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-16T19:39:49+00:00Added an answer on June 16, 2026 at 7:39 pm

    Use .live() instead .click()

    Example:

    $("#tfc-new-nav .hide-menu.menu-hidden").live("click", function() {
        // Do stuff here
    }
    

    This takes into account updated manipulation of the DOM, tested and worked

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

Sidebar

Related Questions

I am working on an animated jQuery menu using Spritely the problem I have
I have a drop down menu using CSS only. I want the drop down
I have a simple accordion menu working using jQuery but I'm having trouble styling
I have a navigation menu on left and I am using jquery to slide
I have an application using Jquery's UI Tabs for an overall menu, and they're
I have a menu that is using jQuery plugin to change the content of
I have a simple accordion menu I've put together today using the jQuery slideDown()
I'm working on a new website, it's using jQuery and CSS3 elements, and it's
I'm using jquery to bring up a second and third drop down menu based
I have a menu working fairly well but can't figure out how to make

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.