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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:19:03+00:00 2026-05-13T12:19:03+00:00

I have a range of items in an HTML drop-down menu that I need

  • 0

I have a range of items in an HTML drop-down menu that I need to find with jQuery so I can then hide them [using .css('display', 'none')].

They are (in this example) all the ones between <option>---- Articles</option> and <option>---- Jargon Buster</option> except for the first six items in this range!

Other than these first six, the number and text of all the other options within this range will vary (apart from from the leading ------ ).

I’m thinking maybe I can utilse the selectors $("#edit-menu-parent option:contains('---- Articles')" and $("#edit-menu-parent option:contains('---- Jargon Buster')" somehow, but I’m not sure how these can be used to get the items in between them.

Any ideas?

<select id="edit-menu-parent" class="form-select menu-title-select" name="menu[parent]">
<option>---- Clients</option>
<option>---- Testimonials</option>
<option>-- Resources</option>
<option>---- Articles</option>
<option>------ Accessibilty Articles</option>
<option>------ Usability Articles</option>
<option>------ Charities Articles</option>
<option>------ Public Sector Articles</option>
<option>------ Web Development Articles</option>
<option>------ Social Media Articles</option>
<option>------ Are Your Online Forms</option>
<option>------ Benefits of Web Standards</option>
<option>------ Benefits of web accessibility</option>
<option>------ Increase Donations to Your</option>
<option>------ Need More Web Traffic? Get</option>
<option>------ The Secret to Successful ALT</option>
<option>------ Top 10 Email Marketing Tips</option>
<option>------ What PAS 78 Means for Your</option>
<option>------ What is Web Accessibility?</option>
<option>---- Jargon Buster</option>
<option>---- Web Design Tips</option>
<option>------ Colour blindness</option>
<option>------ Create a custom 404 page</option>
<option>------ Download time and usability</option>
<option>------ Full stop to the end of alt</option>
<option>------ Javascript and navigation</option>
<option>---- Your Industry News</option>
</select>
  • 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-13T12:19:03+00:00Added an answer on May 13, 2026 at 12:19 pm

    In my test HTML file I tried both calling .hide() and .css("display", "none"), but none of them seemed to work in Safari(Mac), but worked as expected in Firefox(Mac).
    First I thought that the jQuery selector is wrong, but the same happens even if I select simply #edit-menu-parent option.

    I created a script that finds the index of start and end elements and then slice()-s out the required items for deletion. However, I used remove() which didn’t work otherwise. Since it was said that the first six elements must remain there, I have this start+6 there.

    var options =  $("#edit-menu-parent option");
    var start = options.index( $("option:contains(---- Articles)" ));
    var end = options.index( $("option:contains(---- Jargon Buster)" ));
    options.slice(start+6,end).remove();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of items that I need to bubble sort. The bubble
I have range of numbers that range from 1 - 0.00000X . Most are
We have a range of Classic ASP applications that we are looking to port
I have a range of tables that I have normalized for a user profile
I have a range of data that I have approximated using a polynomial of
I have a Range variable that contains an address - $2:$2,$4:$205,$214:$214 - (3 groups
I have a list of items that are each associated with a start and
I want to filter a property within a range, but items that does not
I have a Rails view that produces a HTML report based on the user
I have an app that is importing data from JSON and generating (through JQuery's

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.