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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:11:44+00:00 2026-05-27T01:11:44+00:00

Right, so I’ve got an example website I’m making, and I’m using mostly jQuery.

  • 0

Right, so I’ve got an example website I’m making, and I’m using mostly jQuery. On my footer, I’m getting it to animate on click, and I’ve got it to change the ID of the footer after the click and animation has happened. But when I click it again (to carry out the jQuery commands of the new ID) it doesn’t work. it appears that none of the jQuery code is excecuted after the change of ID. Here is the code used:

This is the code to change the ID in the first instance:

$("#footer").click(function(){
    $("#footercontent").animate({height:"200px"});
    $("#footer").attr("id", "footerclose");

This is the code to change the ID back:

$("#footerclose").click(function(){
    $("#footercontent").animate({height:"1px"});
    $("#footercontent").hide();
    $("#footerclose").attr("id", "footer");
});

This is the CSS for the footer content:

#footercontent {
    width:990px;
    height:1px;
    text-align:center;
    background-color:#FFF;
    padding:5px;
    box-shadow:inset 0 0 25px #000;
    border:0px;
}

And this is the footer and footerclose CSS:

#footer {
    color:#999;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    z-index:99;
    width:150px;
    height:30px;
    border:0px;
    padding:5px;
}

#footerclose {
    color:#999;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    width:150px;
    height:30px;
    border:0px;
    padding:5px;

You can find the site in question here: http://epicgiggle.co.uk/test/example/

I’ve looked everywhere and there is no solution.

Help is much appreciated.

  • 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-05-27T01:11:44+00:00Added an answer on May 27, 2026 at 1:11 am

    You should use jQuery live because the element is not present on the page when you try to attach click event handler.

    Try this

    $("#footer").live('click', function(){
        $("#footercontent").animate({height:"200px"});
        $("#footer").attr("id", "footerclose");
    });
    
    $("#footerclose").live('click', function(){
        $("#footercontent").animate({height:"1px"});
        $("#footercontent").hide();
        $("#footerclose").attr("id", "footer");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I'm making an extremely simple website- about 5 pages. Question is if
Right now, I have three models Post, Comment and User (using Devise ) associated
Right, I've got a slight problem here, in which I've attempted to implement a
Right now I am using learning to program for the iphone and I am
Right now, I have a jQuery UI pop-up dialog that reads from an external
Right now, I'm using this to allow a file to be moved to our
right now I'm creating an array and using: render :json => @comments This would
Right now I'm stuck between using PHP's native session management, or creating my own
I am reading a book about Javascript and jQuery and using one of the
Right now to populate my GridViews I'm using a extended BaseAdapter class on each

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.