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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:01:27+00:00 2026-06-15T03:01:27+00:00

I have the following script which is partially working. HTML: <div class=navigation3> click me

  • 0

I have the following script which is partially working.

HTML:

<div class="navigation3">
    click me
</div>
<div class="dropdown">
    <div class="items">icon Default 3</div>
</div>

jQuery:

$('.navigation3').click(function(event) {
    $(this).toggleClass('active');
    $(".dropdown").toggle();
});​

The .active part works were the clicked .navigtion3s become red, if I click all three, all three go red.

The bit which is not working is the .dropdown. It should be dropping directly under the .navigtion3 divs. Plus at the moment, it is only displaying 1 .dropdown at a time, it should display all if all the .navigation3s are .active.

Also, based on user selection, I will not know how many .navigation3s and .dropdowns will be displayed on the users screen.

I can’t seem to get this to work and would appreciate some jQuery expert help.

jsFiddle:

This is what I currently have:
http://jsfiddle.net/MTESY/12/

  • 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-15T03:01:28+00:00Added an answer on June 15, 2026 at 3:01 am

    How about something like this http://jsfiddle.net/chrismoutray/MTESY/16/

    $('.navigation3').click(function(event) {
        var $nav3 = $(this),
            $dd = $nav3.next('.dropdown');
    
        $nav3.toggleClass('active');
    
        var offset = 30,
            offsettop = $nav3.offset().top + $nav3.height() + offset,
            offsetleft = $nav3.offset().left;
    
        $dd.css({
            top: offsettop,
            left: offsetleft
        });
    
        $nav3.hasClass('active') ? $dd.show() : $dd.hide();
    });
    

    The 2 bits to focus on here are; find the correct dropdown element

    $nav3.next('.dropdown');
    

    And make sure to place the element correctly

    $dd.css({
        top: offsettop,
        left: offsetleft
    });
    

    Its not perfect but it will get you started

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

Sidebar

Related Questions

I have the following script, which when you click the image within the div,
I have the following script, which is working for the most part Link to
I have the following script which is not working for some reason: success: function(
I have the following script which has stopped working due the error in the
I have the following script which works as long as the are static html
I have the following script which loops through a HTML table and gets the
I have the following script which first shows only the first para of the
I have the following script which appears multiple times on my page. I have
I have the following script which will delete a file off a BlackBerry. However,
Currently Im have the following script which checks to see if a checkbox value

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.