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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:09:04+00:00 2026-05-25T17:09:04+00:00

Currently I’m using dt and dd to display some data. What I’m doing here

  • 0

Currently I’m using dt and dd to display some data. What I’m doing here is initially set the dd to display: none and when the dt is clicked display the associate dd.

My HTML markup is

<dt >
       <h1>click here</h1>
</dt>
<dd style="display: none;">
       <h1> DD Data </h1>
</dd>

<dt >
       <h1>click here</h1>
</dt>
<dd style="display: none;">
       <h1> DD Data </h1>
</dd>

jQuery I’m using is

$('dt').live('click', function () {
var dd = $(this).next();

if (!dd.is(':animated')) {
    dd.slideToggle();
    $(this).toggleClass('opened');
}

What I want to do now is to allow one dd to display at a time. When if there is one dd is displaying and if another dt is clicked, i want to close the currently opened dd and display the dd which associate with the clicked dt.

Any help will be appreciate

  • 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-25T17:09:05+00:00Added an answer on May 25, 2026 at 5:09 pm

    You could do:

    $('dt').live('click', function () {
        var nextDD = $(this).next('dd');
        $('dd').hide();
        nextDD.show();
    
    
    });
    

    Fiddle here: http://jsfiddle.net/ktYgB/

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

Sidebar

Related Questions

I'm currently using jqGrid to display data. Part of jqGrid's interface will give you
I am using the StackedColumnSeries from the Silverlight toolkit to display some data. I
I have a legacy application which is (currently) using Django to effectively display data.
I am currently using a number of query string parameters to pass some data
I have a page that is currently using the datetime microformat to display a
I'm currently creating a user interface using WPF and would like to display a
I currently have a web page where the user enters some data and then
I am developing JavaME LWUIT application which needs to display some data on map.
I need to display data from a database in a html table. I am
Using C++ and .net I have a stream of data I want to display

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.