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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:31:21+00:00 2026-06-09T02:31:21+00:00

I’m trying to make a simple jQuery panel slider and have it basically where

  • 0

I’m trying to make a simple jQuery panel slider and have it basically where I want it minus two features. You can see a version of it at: http://jsfiddle.net/7WArj/

Currently the panel slides down over content and closes when the close button is clicked. The button changes because I want the image that will eventually be the button to point up when open and down when closed.

I would love to add the functionality that when you are no longer hovering over the panel, it times out and slides back up after x seconds.

I would also love to add the functionality that if you click anywhere off the slide-panel it will also trigger the panel sliding up.

I attempted some of this with .toggle() and .bind but was unable to make it work properly. The menu would randomly slide up and down, etc.

If there is a better way to write my code, as well, it would be much appreciated.

  • 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-09T02:31:23+00:00Added an answer on June 9, 2026 at 2:31 am

    I am pretty sure that this is what you want, the code is commented with what I did:

    Demo: http://jsfiddle.net/SO_AMK/jhYWk/

    jQuery:

    jQuery(document).ready(function() {
        jQuery("div#toppanel").attr('tabindex', -1); //Let the DIV have focus
    
        jQuery("div#toppanel").blur(function(){
            jQuery("div#panel").animate({height: "0px"}, "fast"); // On blur, hide it
        });
    
        timerRunning = false;
        jQuery("div#panel").hover(function(){ //on mouse over clear a timeout if it exists
            if (timerRunning) {
                clearTimeout(hoverTimeout);
                timerRunning = false;
            }
        },
        function(){ //on mouse out set the timeout
            hoverTimeout = setTimeout(function(){
                jQuery("div#panel").animate({height: "0px"}, "fast");
            }, 2000);
            timerRunning = true;
        });
    
        jQuery('#toppanel').click(function(event){
             event.stopPropagation();
         });
    
        jQuery("div.panel_button").click(function(){
            jQuery("div#panel").focus().animate({ height: "250px" }, "fast");
            jQuery("div.panel_button").toggle()
        }); 
    
        jQuery("div#hide_button").click(function(){
            jQuery("div#panel").animate({height: "0px"}, "fast"); 
        });
    });
    

    ​

    CSS:

    #toppanel {
        outline: 0; /* Remove yellow outline in Chrome */
        z-index: 25;
        text-align: center;
        position: absolute;
        top: 0px;
        left: 0px;
    }
    #panel {
        position: relative;
        height: 0px;
        margin-left: auto;
        margin-right: auto;
        z-index: 10;
        overflow: hidden;
        text-align: left;
        height: 0px;
        display: block;
        background-color: #efefef;
        border: 1px solid #000;
        width: 150px;
    }
    #panel_contents {
        height: 100%;
        width: 603px;
        position: absolute;
        z-index: -1;
    }
    .the_content {
        margin-top:40px;
    }
    

    ​

    ​
    HTML: Same

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

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.