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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:35:36+00:00 2026-05-21T19:35:36+00:00

This is suppose to be very simple, however I just can’t get it to

  • 0

This is suppose to be very simple, however I just can’t get it to work as it should.

The following code should be able to do the following. As soon as page completes loading, a div (div#panel) at the top of the page should scroll down into view. After a few seconds delay the div should scroll back up out off view. The div should also be able to toggle/slide up and down as user clicks on a trigger.

Thanks in advance for advice/suggestions.

$(document).ready(function() {

    $("div#panel").slideDown("slow");
    setTimeout(function(){ 
    $("div#panel").slideUp("slow"); 
    }, 5000);

});

$(document).ready(function() {

    // Expand Panel
    $("#open").click(function(){
        $("div#panel").slideDown("slow");
    }); 

    // Collapse Panel
    $("#close").click(function(){
        $("div#panel").slideUp("slow"); 
    });         
});
  • 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-21T19:35:37+00:00Added an answer on May 21, 2026 at 7:35 pm

    You have to hide() the panel first, so it can slide into view.

    $(document).ready(function(){
        $("div#panel").hide();
    
        var autoTimer = null;
    
        autoTimer = setTimeout(function(){
            $("div#panel").slideDown("slow");
            autoTimer = setTimeout(function(){
                $("div#panel").slideUp("slow");
            }, 5000);
        },2000);
    
        $("#open").click(function(){
            $("div#panel").slideDown("slow");
            if(autoTimer) clearTimeout(autoTimer);
            autoTimer = null;
        });
    
        $("#close").click(function(){
            $("div#panel").slideUp("slow");
            if(autoTimer) clearTimeout(autoTimer);
            autoTimer = null;
        });         
    });
    

    Demo: http://jsfiddle.net/X9Vn4/6/

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

Sidebar

Related Questions

I suppose this question could just as easily be applied to PHP with regard
Suppose this C# code: using (MemoryStream stream = new MemoryStream()) { StreamWriter normalWriter =
Suppose I am building a very simple eclipse plugin for creating new java projects.
All, This question probably has a very simple answer - something I'm overlooking. But
I have a very simple question. Lets suppose there is C# project name Game
I have the following very simple Ext JS 4 script which is supposed to
I have a very odd issue trying to run this quite simple C program
Suppose I have a bunch of (very simple) HTML pages, that I want to
I suppose this question is a variation on a theme , but different. Torrents
I suppose this might be similar to this question , but I'm wondering if

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.