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

  • Home
  • SEARCH
  • 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 6699271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:40:32+00:00 2026-05-26T06:40:32+00:00

I have this select that is constantly changing (adding, removing, etc)… It goes something

  • 0

I have this select that is constantly changing (adding, removing, etc)…

It goes something like this:

<select class="validation" id="6401e0f3802aa3c1d76feca811b3c43c" name="attribute[75]">
<option value="109">Leather 1000</option>
<option value="111">Leather 2000 (+$300.00)</option>
<option value="112">Leather 3000 (+$400.00)</option>
<option value="113">Leather 5000 (+$500.00)</option>
</select>

I am using jQuery to strip out all the color options, which looks like this:

<select class="validation" id="" name="attribute[76]">
<option value="210">1000-Black</option>
<option value="211">2000-Black</option>
<option value="212">3000-Black</option>
<option value="213">5000-Black</option>
</select>

The number before the color corresponds with the leather type. My problem is that there are several hundred color options per leather type.

I am currently using this plugin:

(function($){

$.fn.extend({detachOptions: function(o) {
    var s = this;
    return s.each(function(){
        var d = s.data('selectOptions') || [];
        s.find(o).each(function() {
            d.push($(this).detach());
        });
        s.data('selectOptions', d);
    });
}, attachOptions: function(o) {
    var s = this;
    return s.each(function(){
        var d = s.data('selectOptions') || [];
        for (var i in d) {
            if (d[i].is(o)) {
                s.append(d[i]);
                console.log(d[i]);
                // TODO: remove option from data array
            }
        }
    });
}});   

})(jQuery);

To strip out all other options, including the colors. Currently I have fabric choices and colors working ok, but I need to remove and add only certain colors, and I need it to work automatically.

What I need to do is when Leather 1000 is selected, I need ONLY the color options that have 1000- in it.

Can anyone help me with 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-26T06:40:32+00:00Added an answer on May 26, 2026 at 6:40 am

    here’s an example: http://jsfiddle.net/8x7Cz/

    be aware of the // tricky part you might want to change this

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

Sidebar

Related Questions

I have a query that originally looks like this: select c.Id, c.Name, c.CountryCode, c.CustomerNumber,
I currently have a query that looks like this: SELECT NON EMPTY ([Measures].[TOTAL]) ON
I have a query that looks a bit like this: SELECT weekEnd, MAX(timeMonday) FROM
Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name`
Alright, so I have a query that looks like this: SELECT `orders`.*, GROUP_CONCAT( CONCAT(
I have an NHibernate query that looks like this: var query = Session.CreateQuery(@ select
So I have this query that works perfectly: SELECT users.*, GROUP_CONCAT(categories.category_name) AS categories FROM
Let say that we have the following query: SELECT DISTINCT COUNT(`users_id`) FROM `users_table`; this
I have fields in mysql that look like this: constant1 , constant2, variable1, variable2,
I have a generic base repository class for LINQ-to-Entities that can do things like

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.