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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:06:48+00:00 2026-06-07T17:06:48+00:00

I am having trouble getting jQuery animate to work .To start the div is

  • 0

I am having trouble getting jQuery animate to work .To start the div is hidden with .hide(), then onclick of a button I want to expand the height of the div. Toggle animate works perfect, but I don’t want toggle.

Toggle does this: The div is hidden, I fire the code below, works perfect, then the div gets hidden, fire it again- the div pops up full height and the animates down to 0px. I want it to go from hidden to expanding every time.

$('#logincontainer').animate(
    { 'height':  'toggle' }, 'slow'
);

I tried

{ 'height':  '552px' }, 'slow'
{ 'height':  'auto' }, 'slow'

var h = document.getElementById('logincontainer').scrollHeight;
{ 'height':  h + 'px' }, 'slow'

I just want to expand the height to 552px, which the div already is every time.

  • 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-07T17:06:51+00:00Added an answer on June 7, 2026 at 5:06 pm

    you can try slideToggle():

    Display or hide the matched elements with a sliding motion.

    $('#trigger').click(function(e){
        e.preventDefault()
        $('#logincontainer').slideToggle('slow');
    })
    

    DEMO

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

Sidebar

Related Questions

I'm having some trouble getting binding to work with JQuery. <iframe id=wufooFormz7x3k1 height=281 allowtransparency=true
I'm having trouble getting Jquery .closest() to work. Here's my code, it's simple and
I'm having trouble getting the Jquery Cycle plugin to work. My code is below.
I'm having trouble getting tinyMCE to work with the new jQuery 1.4.2 on IE6.
I'm having trouble getting the Jquery Validation to work with the following rules. I
I'm having some trouble getting a jQuery plugin to work correctly in my MVC
I'm having trouble getting an ASP button to call a jquery script, in this
I'm having trouble getting jQuery to allow only one content-DIV to be visible at
Creating a slideshow jQuery plugin, but having trouble getting it to work with more
I'm having trouble getting jQuery's $(this) function to work as expected... or rather, 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.