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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:21:18+00:00 2026-06-05T04:21:18+00:00

Basically I’m in over my head with this as my knowledge of jQuery is

  • 0

Basically I’m in over my head with this as my knowledge of jQuery is limited. I have a select menu list and depending on the manufacturer you choose those models will be shown with jQuery. The problem is I can’t figure out how to show all models if someone selects “All”. If someone could help me I would appreciate it, right now if you select “all” nothing shows. Also, is this a good way to go about this? Thank you.

http://jsfiddle.net/KAjb7/1/

Or code below:

<select class="manufacturers">
<option class="selected" value="all">All</option>
<option value="motorola">Motorola</option>
<option value="htc">HTC</option>
<option value="lg">LG</option>
<option value="samsung">Samsung</option>
<option value="kyocera">Kyocera</option>
</select>


<div class="scroll-content">
  <ul class="manulist motorola">
    <li><a href="#">Motorola Triumph</a></li>
  </ul>
 <ul class="manulist htc">
   <li><a href="#">HTC WILDFIRE S</a></li>
  </ul>
  <ul class="manulist lg">
<li><a href="#">LG Optimus Slider</a></li>
<li><a href="#">LG Optimus V</a></li>
<li><a href="#">LG Rumor Touch</a></li>
<li><a href="#">LG Rumor 2</a></li>
<li><a href="#">LG 101</a></li>
  </ul>
</div>

And the jQuery:

$(document).ready(function(){

$('.manufacturers').change(function(){
var selected = $(this).find(':selected');
$('ul.manulist').hide();

$('.'+selected.val()).show();
$('.optionvalue').html(selected.html()).
   attr('class', 'optionvalue '+selected.val());
});

});​
  • 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-05T04:21:21+00:00Added an answer on June 5, 2026 at 4:21 am

    You just need to check the value of the selected item and show all of them if it is == ‘all’.

    http://jsfiddle.net/lucuma/WnapS/

    $(document).ready(function(){
    
        $('.manufacturers').change(function(){
        var selected = $(this).find(':selected');
        $('ul.manulist').hide();
            if ($(this).val() == 'all') {
                $('.scroll-content ul').show();
            } else {
        $('.'+selected.val()).show();
        $('.optionvalue').html(selected.html()).
           attr('class', 'optionvalue '+selected.val());
                }
        });
    
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I have a list of delivery checkboxes one for deliver to this address
Basically, I have a UIImageView that will loop through 8 PNGs over 0.5 seconds.
Basically I have converted a tab delimited txt file into a list containing a
basically I have a function that resizes elements accordingly with jquery triggering the function
Basically I have a loop incrementing i, and I want to do this: var
Basically I have this server app I built in vc#, and for some reason
Basically I need to do this query using Zend_Db_Select : SELECT *, `matches`.`name` AS
Basically, I have a CodeIgniter site that registers users through this url: http://website.com/user/register/1 Unfortunately,
Basically I've made a form in Cakephp 2.1 with a jQuery button that appends
Basically I have a large set of data in excel, and I was wondering

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.