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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:32:10+00:00 2026-05-25T12:32:10+00:00

The following code: <script type=text/javascript > $(#accordion > li > div).hover(function () { if

  • 0

The following code:

        <script type="text/javascript" >
            $("#accordion > li > div").hover(function () {
                if (false == $(this).next().is(':visible')) {
                    $('#accordion ul').slideUp(300);
                }
                $(this).next().slideToggle(300);
            });
        </script>

When the user hovers over the li>div item it will cascade down but by the time i see the options it will cascade back up.

edit: the slide up speed seems to work nice at 300 miliseconds but i want to keep it display for 3 secodns then roll back up?

How do i hold the cascade for the a few seconds? so that the user can click on an li item?

EDIT: ADDED MY JSFIDDLE – http://jsfiddle.net/dttdB/

  • 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-25T12:32:11+00:00Added an answer on May 25, 2026 at 12:32 pm

    New Answer

    allright, sounds like you’re new to javascript. Congrats on finding jQuery, it will definitely be a close friend of yours!! Now I’ll show you jQuery-ui accordion

    css

    <!-- language: lang-css -->
        #accordion h3 {
            background-color:grey;
            background-repeat: no-repeat;
            /*border-radius: 10px 10px 10px 10px;*/
            cursor: pointer;
            display: block;
            font-weight: bold;
            height: 48px;
            list-style: circle outside none;
            margin: 1px;
            width: 230px;
        }
    

    html

    <!-- language: lang-html -->
        <div id="leftWrap">
            <div id="accordion">
                <h3>Absorption</h3>
                <div>
                    <ul>
                        <li><a href="c-77-accessories.aspx">Accessories</a><ul>
                            <li><a href="c-81-aa500afg.aspx">AA500AFG</a></li>
                            <li><a href="c-79-aa500f.aspx">AA500F</a></li>
                            <li><a href="c-80-aa500g.aspx">AA500G</a></li>
                            <li><a href="c-78-aa990f.aspx">AA990F</a></li>
                            </ul>
                        </li>
                        <li><a href="c-82-consumables.aspx">Consumables</a></li>
                        <li><a href="c-76-products.aspx">Products</a></li>
                    </ul>
                </div>
                <h3>Fluorescence</h3>
                <div>
                    <ul>
                        <li><a href="c-101-accessories.aspx">Accessories</a></li>
                        <li><a href="c-102-consumables.aspx">Consumables</a></li>
                        <li><a href="c-100-products.aspx">Products</a></li>
                    </ul>
                </div>
            </div>
        </div>
    

    javascript

     <!-- language: lang-js -->
        $("#accordion").accordion({ header: 'h3',
                                    event: 'mouseover',
                                    active:false });
    

    Old Answer

    with some html i can give a better answer, but in general i think you need to bind to both function() options in .hover()

        <script type="text/javascript" >
                $("#accordion > li > div").hover(function (event) {
    //the user has moved their mouse on top of the selected Div "#accordion > li > div"
    //this will 'slide' whatever is next to the div
                  $(this).next().slideToggle(300);
                 }, function(event){
    //the user has moved their mouse away from the selected Div "#accordion > li > div"
    //warning, they may be trying to click on a link in the $(this).next(), don't close on them!
    //I will need some html to help more than this
                 });
            </script>
    

    js-fiddle

    I think i did this right

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

Sidebar

Related Questions

I have the following code: <script type=text/javascript> function SubmitForm() { form1.submit(); } function ShowResponse()
I have the following code: <script type=text/javascript> $(document).ready(function() { $(#Save).click(function() { $.post(url, { data:
I'm using the following JavaScript code: <script language=JavaScript1.2 type=text/javascript> function CreateBookmarkLink(title, url) { if
I have the following Javascript code which controls an accordion type set of divs.
I have the following code where the function codeaddress geocodes the text feild value
I have the following code <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Untitled Document</title>
When the following two lines of code are executed in a bash script, ls
I have the following code $(document).ready(function(){ // class exists if($('.delete').length) { // add click
What is wrong with the following htmla and javascript code formToConvert.html <html> <head> <title>ExampleToConvert</title>
I am new to javascript and trying to execute the following code, could anyone

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.