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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:27:27+00:00 2026-05-23T12:27:27+00:00

I am using the following sliding div script: http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html Currently, the slidetoggle function is

  • 0

I am using the following sliding div script:

http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html

Currently, the slidetoggle function is activated when the .btn-slide button is clicked. This slides up the “panel” div.

Upon clicking the .btn-slide button a second time, the panel div is closed.

I am a complete newb at js, so any assistance would be appreciated. Here’s what I am trying to do:

1) When the mouse moves over (as opposed to clicking) the .btn-slide class, i would like the panel to slide out.
2) Then, when the mouse moves out of either the .btn-slide or #panel, i would like the panel to close. (but if the mouse is over either one, the panel should stay open).

I was able to get it working to where the slidetoggle function would close either one, or the other, but not both.

Thank you in advance for the help.

Sincerely,

Mac


Here is the JS:

<script type="text/javascript"> 
jQuery(function($){
$(document).ready(function(){
    $('.btn-slide').click(function() {
        $("#panel").slideToggle("slow");
        $(this).toggleClass("active"); return false;

    });


});

 });

</script> 

here is the HTML currently being used:

<div id="prod_nav_tab">
<div id="panel"> 
    This is where stuff goes!
</div> 
<p class="slide"><a class="btn-slide">Table of Contents</a></p> 

</div>

I have played with the CSS to fit my particular web site and is as follows (the original js, html, css can be obtained from the link above).

div#prod_nav_tab {
width: 200px;
height: 31px;
overflow: hidden;
background-color:#F00;
float: left;
margin: 0px 0px 0px 75px;
}



a:focus {
    outline: none;
}
#panel {
    background-color:#F00;
    width: 200px;
    height: 200px; 
    display: none;
    position: absolute;
    bottom: 0px;
}
.slide {
    margin: 0;
    padding: 0;
    /* border-top: solid 4px #422410;  **Adds a line at top of slide button to distibuish it */
    background: url(images/btn-slide.gif) no-repeat center top;
}
.btn-slide {
    background: #d8d8d8;
    text-align: center;
    width: 200px;
    height: 31px;
    padding: 0px 0px 0 0;
    margin: 0 0 0 0;
    display: block;
    font: bold 12pt Arial, Helvetica, sans-serif;
    color: #666;
    text-decoration: none;
    position: relative;
cursor: pointer;
/*  background: url(images/white-arrow.gif) no-repeat right -50px;  ** Controls Arrow up/down */

}
.active {
    background-position: right 12px;
}
  • 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-23T12:27:28+00:00Added an answer on May 23, 2026 at 12:27 pm

    When you move away from the .btn-slide to the #panel it hides it now because it triggers the mouseleave event of the .btn-slide.

    To prevent this you should do something like:

    HTML:

    <div id="trigger">
        <a href="" class="btn-slide">Slide down</a>
        <div id="panel">
            Content of your panel
        </div>
    </div>
    

    JQuery:

    jQuery(function($) { 
        $(document).ready(function() { 
            $("#trigger").mouseenter(function() {
                $("#panel").slideDown("slow"); 
                $(this).addClass("active"); 
            }).mouseleave(function() {
                $("#panel").slideUp("slow"); 
                $(this).removeClass("active"); 
            });
        }); 
    });
    

    Make sure in your CSS you then set the panel to be hidden from start…

    div#panel {
         display: none;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following html to load dojo from Google's hosting. <script src=http://www.google.com/jsapi></script> <script
I am using following attached date picker. http://rapidshare.com/files/417385026/jQuery_Date_Picker.zip http://www.2shared.com/file/d2NK63P-/jQuery_Date_Picker.html Problem is if i don't
I have a webpage at http://www.optiekmeulemeester.be/normal with sliding navigation. This happens with the following
I am using Following json url to retrieve images from flickr http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=***&photoset_id=72157625776815845&extras=original_format&format=json&jsoncallback=? Response jsonFlickrApi({photoset:{id:72157625776815845,
I'm trying to implement the following jQuery popout feature on my site: http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/ I
I'm using the following JavaScript code: <script language=JavaScript1.2 type=text/javascript> function CreateBookmarkLink(title, url) { if
I am using this sliding top panel using mootools (for orientation, the code is
Given the following jquery code.. jQuery.fn.sliding = function () { return this.each(function () {
I'm using following rules to validate the username using jQuery validation method. I want
For example I am using following URLs for user profile/dashboard: example.com/person/person/profile example.com/person/person/dashboard Where person

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.