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

  • Home
  • SEARCH
  • 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 6730539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:25:13+00:00 2026-05-26T10:25:13+00:00

So what I would like to happen when the tabs are clicked on the

  • 0

So what I would like to happen when the tabs are clicked on the hidden divs slide down but no matter which one is clicked it will always open on top of the previous. Right now they open in the order they’re in, in the HTML. Here is the Jquery `

$(document).ready(function ($) {

$('.menu-bio').bind('click', function (event) {
    if ($('#bio').is(':visible')) {
        $('#bio').slideUp();
        $('.menu-bio').removeClass('open');
    } else {
        if ($('#media').is(':visible')) {
            $('#media').slideDown(function () {
                $('#bio').slideDown();
                if($('.dropmenu').first().attr('id') != 'bio') $('#bio').insertBefore($('.dropmenu')[0]);           
            });
        } 
        if ($('#dates').is(':visible')) {
            $('#dates').slideDown(function () {
                $('#bio').slideDown();
                if($('.dropmenu').first().attr('id') != 'bio') $('#bio').insertBefore($('.dropmenu')[0]);           
            });
        } 
        if ($('#contacts').is(':visible')) {
            $('#contacts').slideDown(function () {
                $('#bio').slideDown();
                if($('.dropmenu').first().attr('id') != 'bio') $('#bio').insertBefore($('.dropmenu')[0]);           
            });
        } 
        else {
            $('#bio').slideDown();
        }

        $('.menu-bio').addClass('open');
    }
    return false;
});

$('.menu-media').bind('click', function (event) {
    if ($('#media').is(':visible')) {
        $('#media').slideUp();
        $('.menu-media').removeClass('open');
    } else {
        if ($('#bio').is(':visible')) {
            $('#bio').slideDown(function () {
                $('#media').slideDown();
                if($('.dropmenu').first().attr('id') != 'media') $('#media').insertBefore($('.dropmenu')[0]);
            });
        } 
        if ($('#dates').is(':visible')) {
            $('#dates').slideDown(function () {
                $('#media').slideDown();
                if($('.dropmenu').first().attr('id') != 'media') $('#media').insertBefore($('.dropmenu')[0]);           
            });
        } 
        if ($('#contacts').is(':visible')) {
            $('#contacts').slideDown(function () {
                $('#media').slideDown();
                if($('.dropmenu').first().attr('id') != 'media') $('#media').insertBefore($('.dropmenu')[0]);           
            });
        } 
        else {
            $('#media').slideDown();
        }
        $('.menu-media').addClass('open');
    }
    return false;
});

$('.menu-dates').bind('click', function (event) {
    if ($('#dates').is(':visible')) {
        $('#dates').slideUp();
        $('.menu-dates').removeClass('open');
    } else {
        if ($('#bio').is(':visible')) {
            $('#bio').slideDown(function () {
                $('#dates').slideDown();
                if($('.dropmenu').first().attr('id') != 'dates') $('#dates').insertBefore($('.dropmenu')[0]);

            });
        } 
        if ($('#media').is(':visible')) {
            $('#media').slideDown(function () {
                $('#dates').slideDown();
                if($('.dropmenu').first().attr('id') != 'dates') $('#dates').insertBefore($('.dropmenu')[0]);           
            });
        } 
        if ($('#contacts').is(':visible')) {
            $('#contacts').slideDown(function () {
                $('#dates').slideDown();
                if($('.dropmenu').first().attr('id') != 'dates') $('#dates').insertBefore($('.dropmenu')[0]);           
            });
        } 
        else {
            $('#dates').slideDown();
        }
        $('.menu-dates').addClass('open');
    }
    return false;
});

$('.menu-contacts').bind('click', function (event) {
    if ($('#contacts').is(':visible')) {
        $('#contacts').slideUp();
        $('.menu-contacts').removeClass('open');
    } else {
        if ($('#media').is(':visible')) {
            $('#media').slideDown(function () {
                $('#contacts').slideDown();
                if($('.dropmenu').first().attr('id') != 'contacts') $('#contacts').insertBefore($('.dropmenu')[0]);

            });
        } 
        if ($('#dates').is(':visible')) {
            $('#dates').slideDown(function () {
                $('#contacts').slideDown();
                if($('.dropmenu').first().attr('id') != 'contacts') $('#contacts').insertBefore($('.dropmenu')[0]);         
            });
        } 
        if ($('#bio').is(':visible')) {
            $('#bio').slideDown(function () {
                $('#contacts').slideDown();
                if($('.dropmenu').first().attr('id') != 'contacts') $('#contacts').insertBefore($('.dropmenu')[0]);         
            });
        } 
        else {
            $('#contacts').slideDown();
        }
        $('.menu-contacts').addClass('open');
    }
    return false;
});


$('.openbox').bind('click', function (event) {
    if ($(this).parent().hasClass('open')) {
        $(this).next('ul').slidedDown('fast');
        $(this).parent().removeClass('open');
    } else {
        $(this).next('ul').slideUp('fast');
        $(this).parent().addClass('open');
    }
    return false;
});
});

If anyone can help me it would be greatly appreciated, 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-05-26T10:25:14+00:00Added an answer on May 26, 2026 at 10:25 am

    This lines of code do the trick of inserting the element you define #bio, #media or #dates before the other elements. Just have to edit the line below.

    $('#bio').insertBefore($('.dropmenu')[0]);
    $('#media').insertBefore($('.dropmenu')[0]);
    $('#dates').insertBefore($('.dropmenu')[0]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know what will happen in the following hypothetical situation. Let's
I'm surprised this doesn't happen automatically, but I would like my applications window to
Given the following: What I would like to happen: 1. Find all Span TAGS
I'm doing a windows form and would like an audit task to happen every
Would like a for loop in jquery so that: For every hover_link: show hidden
I downloaded http://code.google.com/chrome/extensions/samples.html#ea2894c41cb8e80a4433a3e6c5772dadce9be90d . I would like make it it jQuery, but if i
I have an msi installer (VS2008 set-up project). What I would like to happen,
I would like to have a control similar to tab control but without the
I have a Facebook Application that installs on users' Page tabs. I would like
I would like to use the new Java 7 WatchService to keep tabs on

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.