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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:16:29+00:00 2026-05-13T20:16:29+00:00

I have links that when clicked, select all the checkboxes or deselect them. I

  • 0

I have links that when clicked, select all the checkboxes or deselect them.

I also have a dropdown list that I want to be made visible only if at least one of the checkboxes are selected.

What is the best way to do this?

Should I write login inside the code that selects/deleselects them or is there a better way to do this?

  • 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-13T20:16:30+00:00Added an answer on May 13, 2026 at 8:16 pm

    I would have a function that sets the dropdown’s visibility. I would call this function from the click handlers for each of the checkboxes and from the link’s handlers — I’m assuming that your link handlers don’t merely fire a click event on each box, but set it’s status. Unless you have other behavior to trigger firing the click event on each checkbox will be very expensive. In your function that set’s visiblity, use a test to see if the number of checked boxes is greater than 0 as the new state for the visibility.

    function setDDVisibility() {
       var isVisible = $('.checkbox-class-selector:checked').length > 0;
       if (isVisible) {
          $('#ddl').show();
       }
       else {
          $('#ddl').hide();
       }
    }
    
    $('.checkbox-class').click( function() {
       ... do stuff ...
       setDDVisibility();
       return false;
    });
    
    $('.link-selector').click( function() {
       ...set up checkboxes...
       setDDVisibility();
       return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() {
I have links like these that I want to change: mypage.com?page=missions&id=5 mypage.com?page=hello I tried
Change all links that have an image in it to: javascript(alert(thehref)); eg. <a href=/galleries/anna-leah-111827/image01.html><img
I have a list of links to pages on my site. I want the
I have a list with button links when a button list is clicked this
I have link that calls a function when clicked: <a href=javascript:spawnMenu(this); id=link1>Test1</a> To make
I have a link that, when clicked, should deliver an email by using an
I have some jQuery code that highlights a link when clicked, and changes the
I have some code right now that executes when a link is clicked. The
On my website I have links that are as follows, (shortened for easiness) <a><h2

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.