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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:03:22+00:00 2026-06-07T16:03:22+00:00

I have a page that queries events on a selected calendar date and groups

  • 0

I have a page that queries events on a selected calendar date and groups them in an individual table for each different event type.

Obviously this list could get quite large and rather than having everything displayed and the user having to scroll a lot I was hoping I could use the toggle function to hide a list of events for an event type when they click the table header for that event type.

The issue I’m struggling to get my head around is that I have no idea how many different event types there will be for any selected date so how do I write a function that will hide only that selected event type?

  • 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-07T16:03:24+00:00Added an answer on June 7, 2026 at 4:03 pm

    You’re not really giving us much in your question to go on so perhaps I’m totally off with this answer.

    But I think you need to add an event-type attribute to the elements that represent the events, then you can use jQuery select the elements and apply a toggle.

    <style>
    display-none { display:none; }
    </style>
    
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>
    $().ready(function () {
    
        $('div[event-type]').toggle('display-none');
    
        $('div[event-type-header]').bind('click', function () {
            var eventType = $(this).attr('event-type-header');
            $('div[event-type="' + eventType + '"]').toggle('hide-event-type');
        });
    });
    </script>
    
    <!-- header -->
    <div event-type-header="party">toggle party</div>
    <div event-type-header="auction">toggle auction</div>
    
    <!-- content -->
    <div event-type="party">party1</div>
    <div event-type="auction">auction1</div>
    <div event-type="party">party2</div>
    <div event-type="auction">auction2</div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP page that queries a DB to populate a form for
I have a page that builds out a table. Nothing else on that page
I'm creating a calendar that displays a timetable of events for a month. Each
I have a piece of jQuery code that queries a page via POST and
I have a tabbed page I inherited that works through a number of queries
I have a JSP page that queries a MySQL database, I want to send
I have a page that needs to make six nearly identical queries with the
I have VBS code in an html page that gets queries from an access
I have currently created a facebook like page that pulls notifications from different tables,
I have an ASPX page that makes a lot of database queries that I

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.