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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:19:59+00:00 2026-06-02T23:19:59+00:00

My page layout is 3 horizontal DIVS. The middle DIV is going to have

  • 0

My page layout is 3 horizontal DIVS. The middle DIV is going to have content loaded into it. I want the DIV to do a smooth height resize to the appropriate size (like using animate) then fade in the content.

This is what I have at the moment

<div id='a'></div>
<div id='b'>foo</div>
<div id='c'></div>

$( '#a ').fadeOut().innerHtml('bar').hide().fadeIn()

This gives me close to what I want, but looks pretty rough

I am using jQuery 1.7.2 and also have jQueryUI accessible

Elaboration

Currently, the middle DIV will fadeout, then (as there is no content) will disappear. When the new content is added, it instantly resizes and fades in the new content.

What I want to happen is the content fades out and keeps the height. When the new content is added, I want the div to resize to the appropriate height and THEN fade in the content

  • 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-02T23:20:02+00:00Added an answer on June 2, 2026 at 11:20 pm

    Change it to the following. Note that you have used innerHtml on a JQuery object, the correct syntax is html. Also, you’ve unnecessarily called hide after you’ve set the content, but the item should already be hidden because you have called fadeOut.

    Try this:

    $( '#a ').fadeOut().html('bar').fadeIn()
    

    DEMO: http://jsfiddle.net/SmZgw/1/

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

Sidebar

Related Questions

I have a simple page layout with two divs--one on top, and one on
I have two <div> s on my page. I want to arrange them side-by
I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li
I want to add auto stretch the content div and add horizontal scroll to
I have a page layout that I use in my SharePoint solution when I
I have a page layout involving a lot of position absolute and z-indexing, so
Basically, we want to A/B test 2 different page layout headers. There are some
we have a Tiles layout page having Header, Menu, Body and Footer. In this
I have a basic layout page template: --- layout: default --- <header class="sidebar"> {{
I've got a problem with my page's layout. I want to create 3 table

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.