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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:18:26+00:00 2026-05-10T21:18:26+00:00

I have a status message box (div box) positioned at the bottom of a

  • 0

I have a status message box (div box) positioned at the bottom of a web page using position: fixed; and bottom: 0;. Its height is initially 11px.

I want to allow users to double click it when there are more status messages than what can fit within the default hight, make it grow. If they double click it again or move the mouse away from the box, it should shrink again.

I managed to get this working exactly as I want, but it seems to me that it should be possible to write this more elegantly:

<script type='text/javascript'>     $(document).ready(function() {         $('#footer').dblclick(showStatusBar);     });          function showStatusBar() {         var footer = $('#footer');         footer.unbind('dblclick', showStatusBar);         footer.animate({ height: '100px' }, 200);         footer.dblclick(hideStatusBar);         footer.bind('mouseleave', hideStatusBar);     }      function hideStatusBar() {         var footer = $('#footer');         footer.unbind('mouseleave', hideStatusBar);         footer.unbind('dblclick', hideStatusBar);         footer.animate({ height: '11px' }, 200);                     footer.dblclick(showStatusBar);     } </script>  

I played around with the toggle event, but was unable to get it working.

  • 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. 2026-05-10T21:18:26+00:00Added an answer on May 10, 2026 at 9:18 pm

    You can create one function which acts as a toggle function. Something like this:

    // NOTE: Untested! function statusBarToggle() {     /* Starts as hidden. */     if(this.isHidden == undefined)         this.isHidden = true;      this.isHidden = !this.isHidden;      var newHeight = this.isHidden ? 11 : 200;      $(this)         .stop()         .animate({ height: newHeight + 'px' }, 200);      /* When mouse leaves open status bar, close it. */     if(this.isHidden)         $(this).unbind('mouseleave', statusBarToggle);     else         $(this).bind('mouseleave', statusBarToggle); }  $(document).ready(function() {     // ...     $('#footer').dblclick(statusBarToggle); } 

    This gives the status bar an ‘isHidden’ property, and uses it to check if we are showing or hiding the status bar. This function also works with other elements if you need it to.

    (That that you can chain many jQuery commands, as I did once above with the ‘stop’ and ‘animate’ functions.)

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

Sidebar

Related Questions

I am try to develop a status box using jquery, so I have a
I'm using the TTThumbsViewController section of the three20 framework, and I have the status
Well I'm using a Window as my custom message box with a couple of
I own an online game where you have a status box. Which you can
I have a check box group in my page. After checking the inputs, if
I have the following JSON object: { response: { status: 200 }, messages: [
I have some status text displayed in a BASH script, e.g.: Removed file sandwich.txt.
Is it possible to have git status only show the modified files due, in
We have hidden the status bar in our application. But when there is an
In the iPod app, the navigation views have the default status bar style, and

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.