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

  • Home
  • SEARCH
  • 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 6794527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:13:58+00:00 2026-05-26T18:13:58+00:00

I have a small block that contains something like this: Login | Register When

  • 0

I have a small block that contains something like this: Login | Register

When the user clicks Login, the block extends below and reveals a form for the user to login. Clicking Login again hides the form again.

The same goes for when a user clicks on Register (but with a different form). If Login or Register is clicked when the other form is visible, the newly selected form should be made visible and the other should disappear.

I would like to do more than just make the forms appear out of thin air. I’m trying to get it to “dropdown” with a very small amount of lag. Similarly, it should “rollup” when the form is re-toggled.

If this is simple to do, could someone provide some code? If it is a little more involved maybe an explanation or a link that would help me figure it out myself would be very helpful.

  • 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-26T18:13:58+00:00Added an answer on May 26, 2026 at 6:13 pm

    Use a framework such as JQuery to simplify this for you. It simplifies and normalizes all the bad parts of JavaScript so coding JS can become fun again. Unless you are a guru and understand all the design flaws and inconsistencies between “JavaScript” and “JScript”, a framework is the way to go. JQuery is only one of a handful. If you don’t prefer the syntax of JQuery, you can research Mootools, Dojo, or YUI:

    $('#login').click(function(){
        $('#loginForm').slideToggle('fast');
    });
    

    http://api.jquery.com/slideToggle/

    Demo: http://jsfiddle.net/vNeXq/

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

Sidebar

Related Questions

I have a small code block that should append text to the beg of
ok, so I have this small block of text: function onfocus(event) { if ($(this).val()
I have a small bit of code that runs in an applet that contains
Hi I'm using LateX. I have a block of text that I'd like to
I have small utility that does some processing on a file and changes the
I have small web app that generate PDF files as a report. I'm trying
BACKGROUND: I would like to have small labels in columns of a table. I'm
I have some code that roughly does this inside of a GAE worker task:
I have a problem in Grails 1.1.2 + MySQL. My domain class Something contains
I have a page that contains a WebBrowser control that is frequently updating content.

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.