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

The Archive Base Latest Questions

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

The select is sometimes too big so I want to filter it. I will

  • 0

The select is sometimes too big so I want to filter it. I will have 3 checkboxes to turn off/on some options based on values. Like in the sample on jsfiddle

  • if the value of an option contains d hide it – in my example we need to hide 2 options
  • if the checkbox is unchecked show the value

Could be done in jQuery. Any idea how?

It is good enough for me if it works in firefox ( chrome is good too but not necessary, the same for safari )

NOTE:

There are going to be 3 checkboxes to filter values that contain w, d and ,h. So the hiding/showing must work for all of them.


Final code on jsfiddle based on @ShankarSangoli answer.

  • 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-25T00:04:36+00:00Added an answer on May 25, 2026 at 12:04 am

    Hiding an option in a select list is not supported in all the browsers. jQuery even cannot do anything to make it cross browser supported. But we can disable the option using disabled property.

    Here is the working demo with option disabled on checkbox click.

    http://jsfiddle.net/ggWJu/8/

    Here is the working demo to add/remove option from the select box on checkbox click. It adds the option at the same location where it was removed from.

    http://jsfiddle.net/ggWJu/9/

    Here is the fiddle which will add/remove all the options if the option value contains the checkbox value.

    http://jsfiddle.net/ggWJu/10/

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

Sidebar

Related Questions

I have an Entity. And sometimes I need this object also contains some value,
I have a database with many columns and sometimes I need to select quite
I sometimes write SELECTs on the form: SELECT a.col1 + b.col2 * c.col4 as
SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part:
select max(DELIVERY_TIMESTAMP) from DOCUMENTS; will return the time that the latest document was delivered.
select * from myTable where myInt will not show any possible_keys when explaining the
Sometimes a query on SQL*Plus might yield too many rows t fit on the
I have an application where users start taking tests and sometimes the users forget
This is the pseudo-SQL I want to generate: SELECT * FROM Table WHERE Column1
I have a query that's used in a reporting system of ours that sometimes

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.