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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:04:57+00:00 2026-06-09T05:04:57+00:00

Relatively new to jquery. I’m trying to make a button like the accordion button…something

  • 0

Relatively new to jquery. I’m trying to make a button like the accordion button…something that will take the button and slide out a div beneath it like the theme selector on this page: http://craigsworks.com/projects/qtip2/demos/#themeroller (not even sure what to call it).

The big parts are that it slides out and that it sits above the content on the page and doesn’t change the div’s height when it slides out.

Does anyone know of a widget or a way to work an accordion button (or other button) to do this?

Thanks!

  • 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-09T05:04:59+00:00Added an answer on June 9, 2026 at 5:04 am

    This fiddle should get you started. Be aware there are some issues with ie 7, if you are worried about IE7. You can fix the issues with a bit of conditional styling.

    To Break it down

    HTML

    <div class="multiButton">
        <input class="main" type="button" Value="Set Up"/><input type="button" class="Selector" value="^"/>
        <ul class="options">
            <li><a href="linka.html">Set Up</a></li>
            <li><a href="linkb.html">Update</a></li>
        </ul>
    </div>
    <div>Some more content</div>
    

    CSS

    /*This is the "Slider"*/
    .multiButton ul
    {
        display:none;
        border: solid 1px black;
        width:75px;
        position: absolute;
        background-color:#FFF;
    } 
    
    
    /*Main Part of the button*/    
    .multiButton .main
    {
        border: solid 1px black;
        width:60px;
    }
    
    
    /*Slider "trigger"*/
    .multiButton .Selector
    {
        border: solid 1px black;
        border-left:none;
        width:15px;
    }
    
    
    /*The Whole "Button"*/
    .multiButton { position: relative;}
    

    Javascript

     /* Trigger the dropdown */    
     $(".multiButton .Selector").click(function(){
        $(".multiButton ul").slideToggle();
     });
    
    
     /* Slide up the drop down if the mouse leaves the button */
     $(".multiButton").mouseleave(function() {
        $(this).children("ul").slideUp();
    });
    
    /* Change the button text and slide the dropdown up on link click */
    $(".multiButton a").click(function(){
        $(this).closest(".multiButton").children(".main").val($(this).text());
        $(this).closest(".options").hide();
        return false; /* Remove this line if you want to use the links in the drop down */
    });
    

    NOTE: this is just meant to get you started. You may need to wire up further event handlers for clicking the button on links depending on your needs.

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

Sidebar

Related Questions

Relatively new to JQuery. I've got some code that does a banner swap with
I'm relatively new to JQuery. I'm trying to understand how to select a child
I am relatively new to jQuery, and I would like to be able to
Relatively new to dealing with XML in jQuery. I am trying to retrieve a
I'm relatively new to jquery, so I have what I hope will be a
Hi I am relatively new to javascript and jQuery and while trying to create
i'm relatively new to jquery and javascript and am trying to pass a unique
I am relatively new to using jQuery and would like to use the load
I am relatively new to jQuery, I am trying to work around this code
I'm relatively new to JQuery/JS so if you could please make your answers idiot

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.