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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:13:06+00:00 2026-05-22T18:13:06+00:00

First, I need to say I’m a beginner in jQuery and I need this

  • 0

First, I need to say I’m a beginner in jQuery and I need this for for my HTML/JS class. So here is what I need to do

    <div class="event">
    <div class="event-bar">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td class="space" colspan="7">
            </tr>
            <tr>
                <td class="event-date"><p>22 IV</p></td>
                <td class="event-place">19.30<br/>Kościół Księży Misjonarzy</td>
                <td class="event-doc">carte blanche</td>
                <td class="event-title">johann sebastian bach<br/>Pasja wg św. Mateusza</td>
                <td class="event-performers">Anna Schoek<br/>Stefan Telefan<br/>Lorem Ipsum</td>
                <td class="event-leader">dyrygent</td>
                <td class="event-toggler"><div class="toggler"></div></td>
            </tr>
            <tr>
                <td class="space" colspan="7">
            </tr>
        </table>
    </div>
    <div class="event-description">
        <p>...</p>
    </div>
</div>

The thing I need to achieve is div. toggler which when pressed should toggle div. event-description, there are X div.event. Every time you click div. toggler should only toggle current div event-description and hide other if other is open (one toggle at a time).

I cannot really do a fight with .parent() to get outside table.

  • 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-22T18:13:07+00:00Added an answer on May 22, 2026 at 6:13 pm

    Create a new css class – hidden:
    then in css:

    .hidden {display:none;}
    

    jquery:

     $(document).ready(function () {
            $('.toggler').click(function () {
                $('.event-description').addClass('hidden');
                $(this).parents('.event:first').find('.event-description').removeClass('hidden');
            });
        });
    

    should do it.

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

Sidebar

Related Questions

I'm here now because of two things. First: I need to modify a jQuery
First of all I need to say that I'm new to jQuery. When I
Explanation: Say package A is always built first and then package B. I need
I'm working with jQuery for the first time and need some help. I have
String[] a = c.toArray(new String[0]); First: Do I need type cast here? (I think
First of all, I need to say that my English is not good. So
Lets say we need to select two sets from a table: Things var GradeA
Let's say I need to access a web service from an iPhone app. This
Here is what I need: Let's say I have a hotel rooms rental website
1) The first loop I need to use is a do/while. In this loop

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.