title: Drop down price filter
body: <p>I created a product matrix/selector using Jquery and its working fine overall except for the price filter which is also working but kinda separate to the selector. Basically, at the moment when a feature is selected from the list it will present the product and if one wanted to filter based on the price they would select from the drop down. The problem is that the price filter is filtering regardless if that product has that feature or not, the price filter needs to only filter the products that are shown by feature selector.</p>
  
  <p>I need help in the script so that Price filter only filters the products that are displayed by the selectors and not show any product other product and if a price range is selected and that product is not displayed to return a message like "This product is not available based on the price range and feature selected"</p>
  
  <h3>The HTML:</h3>
  
  <pre><code> &lt;div id="pmcontainer"&gt;
    &lt;p&gt;Price Filter:
     &lt;select name="pricefilter" class="pricefilter"&gt;
      &lt;option value="0" selected&gt;-- Filter by Price Range --&lt;/option&gt;
      &lt;option value="High"&gt;High End&lt;/option&gt;
      &lt;option value="Top"&gt;Top End&lt;/option&gt;
      &lt;option value="Mid"&gt;Mid Range&lt;/option&gt;
      &lt;option value="Low"&gt;Entry Level&lt;/option&gt;
     &lt;/select&gt;
    &lt;/p&gt;
    &lt;div id="application" class="selectors"&gt;
     &lt;h4&gt;Select by Application/Features&lt;/h4&gt;
     &lt;ul&gt;
      &lt;li&gt;Outlets
       &lt;ul&gt;
        &lt;li class="c2"&gt;2 Outlets&lt;/li&gt;
        &lt;li class="d145"&gt;7 Outlets&lt;/li&gt;
        &lt;li class="b8f b12r a12 ps10"&gt;8 Outlets&lt;/li&gt;
       &lt;/ul&gt; 
      &lt;/li&gt;
      &lt;li&gt;Filtering 
       &lt;ul&gt;
        &lt;li class="a12 ps10"&gt;Active&lt;/li&gt;
        &lt;li class="b8f b12r"&gt;Cascade&lt;/li&gt;
        &lt;li class="c2 d145"&gt;Passive&lt;/li&gt;
        &lt;li class="c2 d145 b8f b12r a12 ps10"&gt;Multi&lt;/li&gt;
       &lt;/ul&gt;
      &lt;/li&gt;
     &lt;/ul&gt;
    &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="products"&gt;
       &lt;h3&gt;Products&lt;/h3&gt;
    &lt;ul&gt;
     &lt;li class="c2"&gt;Product C2&lt;/li&gt;
     &lt;li class="d145"&gt;Product D145&lt;/li&gt;
     &lt;li class="b8f"&gt;Product B8f&lt;/li&gt;
     &lt;li class="b12r"&gt;Product B12r&lt;/li&gt;
     &lt;li class="a12"&gt;Product A12&lt;/li&gt;
     &lt;li class="ps10"&gt;Product PS10&lt;/li&gt;
    &lt;/ul&gt;
   &lt;/div&gt;
  </code></pre>
  
  <h3>The JQuery Script</h3>
  
  <pre><code> &lt;script type="text/javascript" charset="utf-8"&gt;
       $(document).ready(function() { 
           //PRODUCT SELECTOR
        $('.products li').hide();
        $('#pmcontainer li ul li').click(function(e){
            e.preventDefault();
            $('.products li').hide();
             var classes = $(this).attr('class').split(' ');
           $.each(classes, function() {
                $('.products li.' + this).fadeIn("slow");
            });
            $('#pmcontainer li ul li').removeClass("current");
            $(this).addClass("current");
        });
        //PRICE FILTER
        $.pricemap = {
            '0' : $([]),
            'High' : $('.products .ps10'),
            'Top' : $('.products .a12'),
            'Mid' : $('.products .b8f, .products .b12r'),
            'Low' : $('.products .c2, .products .d145')
          };
          $('.pricefilter').change(function() {
            // hide all
            $.each($.pricemap, function() { this.hide(); });
            // show current
            $.pricemap[$(this).val()].show();
          });
       });
   &lt;/script&gt;
  </code></pre>
  
  <p>Hope this is clear</p>