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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:41:52+00:00 2026-05-11T18:41:52+00:00

I have the layout as follows: <div id=outerwrap> <div id=innerwrap> <div id=centerc>…</div> <div id=rightc

  • 0

I have the layout as follows:

<div id="outerwrap">
          <div id="innerwrap">      
             <div id="centerc">...</div>          

             <div id="rightc" style="font-weight:bold">
          </div>
          <div style="background-color:White;height:10px;top:284px;left:0px"></div>

          <div id="leftc">..</div>
        </div>
       <div id="footer"">...</div>

    #outerwrap
    {
       background-color: #EE44E7;
    }

    #innerwrap
    {
       background-color: #EE44E7;
       margin-right: 200px;
       top:0px;
       height:100%;
    }


    #leftc
    {
       position: absolute;
       top: 111px;
       left: 0px;
       width: 197px;
       background-color: #EE44E7;
       font-size: 10px;
    }

    #centerc
    {
       position: relative;
       margin-left: 199px;
       padding: 0px;
       background-color: white;
    }

    #rightc
    {
       position: absolute;
       top:111px;
       right: 0px;         
       width: 199px;
       color: blue;
       background-color: #EE44E7;
       font-size: 10px;
    }


#footer
    {
    padding: 0px;
    margin: 0px;
    width: 100%;
    height: 62px;
visibility: hidden;
    }

The div leftc has children elements including images inside it.

What I want to do is that when the page loads, the children of leftc should be hidden and the leftc should have width=20px. When the user hovers the mouse ‘on’ leftc, the leftc should become 197px wide with smooth animation and children should now be visible. When user hovers ‘out’ the mouse, the children should be hidden and leftc width should be 20px only with animation.

How can I do this in jQuery that works on all browsers including IE8. Thank you.

  • 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-11T18:41:52+00:00Added an answer on May 11, 2026 at 6:41 pm

    Something like this:

    $(document).ready(function() {
      $("#leftc").css("width", "20px").children().css("display", "none");
    
      $("#leftc").hover(function() {
        $(this).stop();
        $(this).animate({ width: "197px" }).children().css("display", "block/inline");
      }, function() {
        $(this).stop();
        $(this).animate({ width: "20px" }).children().css("display", "none");
      });
      ...
    });
    

    edit: my bad, I mis-read your question, just select all children and hide them (:

    2nd edit: see code above for hover-fix. You can use the stop() function to stop all animations on that element, so that you’ll start off fresh every time.
    If you want to do it with a click event, you can simply set a flag like so:

    var leftActive = false;
    $("#leftc").click(function() {
      if (leftActive) {
        $(this).animate({ width: "20px" }).children().css("display", "none");
        leftActive = false;
      } else {
        $(this).animate({ width: "197px" }).children().css("display", "block/inline");
        leftActive = true;
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout as follows: <div style=width: 300> <div style=width: 300>Some Content</div> </div
I have a ContentPane defined as follows: <div id=searchResultsContentPane data-dojo-type=dijit.layout.ContentPane data-dojo-props='splitter:false, region:center'></div> I am
I have a layout roughly as follows: <div id=foo> <!-- a bunch of content
i have h:selectOneRadio as follows: <div id=container class=container> <h:selectOneRadio layout=pageDirection id=sel_radio value=#{mBean.selectedRadio}> <f:selectItem id=option1
I have layout as follows. Height of resizeable element is to kept such as
I have a layout in XML as follows: <LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:onClick=myButton.performClick /> myButton
I have a simple layout as follows. Even though, I set all attributes as
I have following layout: 4 rounded corners background and two panels (left panel and
I have the code as follows: <html> <head> <style type=text/css> #container { } #content
I have a panel using the card layout as follows: var cardpanel = new

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.