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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:24:54+00:00 2026-06-18T17:24:54+00:00

$(document).ready(function(){ $(dt).click(function(){ $(dl).nextUntil(dl).find(a.open).addClass(closed); $(dd).hide(fast); $(this).next(dd).slideToggle(fast); $(this).children(a).toggleClass(closed open); return false; }); }); I want to

  • 0
        $(document).ready(function(){
            $("dt").click(function(){
                    $("dl").nextUntil("dl").find("a.open").addClass("closed");
                    $("dd").hide("fast");
                    $(this).next("dd").slideToggle("fast");
                    $(this).children("a").toggleClass("closed open");
                    return false;
            });
    });

I want to check where class is open and change it to closed between the dl tags…i can´t figure this one out and i´m stuck here…hope someone could give me a hint oder help me to solve this…nextuntil didn´t work…

–> if opened the color should be white
–> closed grey

Problem is, it stays white till you click one more time…i hope the problem is clear…

http://jsfiddle.net/z85Lg/20/

  • 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-18T17:24:55+00:00Added an answer on June 18, 2026 at 5:24 pm

    Change:

    $("dl").nextUntil("dl").find("a.open").addClass("closed");
    $(this).children("a").toggleClass("closed open");
    

    To:

    $("dl").find("a").removeClass('open');
    $(this).children("a").addClass("open");
    

    http://jsfiddle.net/rV9D7/

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

Sidebar

Related Questions

$(document).ready(function(){ $('.views-field-nothing').click(function(){ $(this).parent().find('.comments-toggle').slideToggle(fast); $('.comments-toggle:contains('Anonimo')').css(display, none); }); }); at first it must show the comment
$(document).ready(function () { $('.raj').click(function () { if (!$(this).hasClass('already')) { $('.infos').html(''); $('.infos').hide(fast); $.ajax({ type: POST,
$(document).ready(function() { $(ul li).click(function() { $(this).find(p).slideToggle(normal); return false; }); }); With this piece of
This works. $(document).ready(function(){ $(.items article).click(function(){ window.location=$(this).find(a).attr(href); return false; }); }); However , when the
$(document).ready(function(){ $(#CO_createAccount).click( function (){ if(this.checked){ $(.CO_accountForm).show(); } else { $(.CO_accountForm).hide(); } }); }); and
I have this: jQuery(document).ready(function(){ jQuery('a.color2030').click( function() { jQuery('tbody').hide(); jQuery('tbody.color2030').show(); }); jQuery('a.color2031').click( function() { jQuery('tbody').hide();
JSFIDDLE $(document).ready(function() { $(.chk).click(function() { $(.chk:checked).each(function() { $(.+this.id).show(); }); $(.chk:not(:checked)).each(function() { $(.+this.id).hide(); }); //
$(document).ready(function() { $(#cover img).click(function(event) { var selected_script = $(this).attr('id'); //alert(selected_script); //alert('#run_'+selected_script); $('#run_'+selected_script).hide(); }); });
I have this function: $(document).ready(function() { $('.UIDropDown').click(function () { $('.button', this).click(function(e){ e.preventDefault()}); $(this).addClass('active'); });
I have this: $(document).ready(function() { $(input[type=button]).click(function () { $(#test).html(W3Schools); alert(Would submit: + $(this).siblings(input[type=text]).val()); $.ajax({

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.