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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:54:54+00:00 2026-06-16T05:54:54+00:00

So this is pretty basic stuff but I’m awful with javascript. I’m working on

  • 0

So this is pretty basic stuff but I’m awful with javascript.

I’m working on the following page: http://mockingbirdagency.com/thebox/bettercss/login-1.html

with the following function.

<script type="text/javascript">                                         
$(document).ready(function() {
    $('#button-sign-up').click(function() {
        $(this).css("margin-top","10px");
        $('#details').toggle(500);
        $('#container-bloc-center').css("height", "290px")
    });
});
</script>   

When I click on the button again,I’d like it to go back to its original position, how can I do that ?!

  • 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-16T05:54:55+00:00Added an answer on June 16, 2026 at 5:54 am

    We cannot easily tell you how to reverse changes to CSS if we don’t know the original state of the CSS.

    In your CSS if you set up your defaults for margin-top and height of your two elements:

    #button-sign-up { margin-top:0px; }
    #container-bloc-center { height:25px; }
    

    And also give them an alternate class:

    #button-sign-up.active { margin-top:10px; }
    #container-bloc-center.active { height:290px; }
    

    Then in your script you could just toggle the active class:

    $(document).ready(function() {
        $('#button-sign-up').click(function() {
            $(this).toggleClass("active");
            $('#details').toggle(500);
            $('#container-bloc-center').toggleClass("active");
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, this is probably pretty basic stuff, but it took me quite some time
this seems pretty basic stuff here, but actually i'm finding it a bit harsh
Hi this is pretty basic jQuery stuff but i am a little lost. So
Pretty basic stuff here, trying to pull the number 14.5 out of this string
this is a pretty basic question but I can't seem to get it right.
This is a pretty basic question but I can't find a good answer for
(I think this is a pretty basic question on OOP, but unfortunately I wasn't
I think this is a pretty basic question, but after Googling around I can't
I realize this question is pretty basic, but I'm really stuck. I have a
So this is pretty basic, but I don't really know C. I want to

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.