3 selectbox on change together
<p>on my site im adding a 3 filter, fuel type, drive type and vehicle type,ive got the code semi-working, it shows the cars based on the select boxes, but with one problem, i want it to not show the other choices. EG when you select petrol auto car it shows some cars that are not manual, but are petrol cars, i only want it to show the exact matches, so if you select petrol manual car, it will only show you cars that are petrol AND manual AND cars.</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;


 &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;          
 &lt;script type="text/javascript"&gt;
$(function() {
    var fuel = ''; // Keep track of selections
    var drive = '';
    var type = '';
    $('#fuel select').on("change", function() {
    fuel = (this.value ? '.' : '') + this.value;
    selectModels();
});
        $('#drive select').on("change", function() {
    fuel = (this.value ? '.' : '') + this.value;
    selectModels();
});
    $('#type select').on("change", function() {
    fuel = (this.value ? '.' : '') + this.value;
    selectModels();
});
    function selectModels() { // Select matching models
        $('div.modelContainer').hide(). // Hide all
            filter(fuel + drive + type).show(); // Show matches
    }
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="fuel" class="controller"&gt;
&lt;span class="controllerLabel"&gt;fuel:&lt;/span&gt;
&lt;select&gt;
  &lt;option value="all"&gt;all&lt;/option&gt;
  &lt;option value="petrol"&gt;petrol&lt;/option&gt;
  &lt;option value="diesel"&gt;diesel&lt;/option&gt;
&lt;/select&gt;
&lt;/div&gt;



&lt;div id="drive" class="controller"&gt;
&lt;span class="controllerLabel"&gt;drive:&lt;/span&gt;
&lt;select&gt;
  &lt;option value="all"&gt;all&lt;/option&gt;
  &lt;option value="auto"&gt;auto&lt;/option&gt;
  &lt;option value="manual"&gt;manual&lt;/option&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;div id="type" class="controller"&gt;
&lt;span class="controllerLabel"&gt;type:&lt;/span&gt;
&lt;select&gt;
  &lt;option value="all"&gt;all&lt;/option&gt;
  &lt;option value="car"&gt;car&lt;/option&gt;
  &lt;option value="4"&gt;4x4&lt;/option&gt;
  &lt;option value="7"&gt;peoeple&lt;/option&gt;
  &lt;option value="vanl"&gt;van&lt;/option&gt;
&lt;/select&gt;
&lt;/div&gt;



&lt;div class="modelContainer  petrolmanualcar"&gt;

&lt;!-- &lt;a id="" href="panda.html" title="Panda 1.2" accesskey="1"&gt;&lt;/a&gt; --&gt;
&lt;p&gt;&lt;img align="right" alt="Panda 1.2" id="image47" title="Clio 1.2" src="images/panda.jpg" width="150" height="115"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="Panda.html"&gt;&lt;strong&gt;Fiat Panda 1.2 5Dr:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&amp;pound;25.00 per Day&lt;p&gt;
&amp;pound;130.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;





&lt;div class="modelContainer  petrol auto car"&gt;

&lt;!-- &lt;a id="" href="focus.html" title="Auto. Focus 1.6" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="Automatic 1.6" id="image4foc" title="Automatic or Manual Focus 1.6" src="images/Focus.jpg" width="200" height="130"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="focus.html"&gt;&lt;strong&gt;Auto. Ford Focus 1.6:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&amp;pound;32.00 per day&lt;p&gt;
&amp;pound;175.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;


&lt;div class="modelContainer diesel manual car"&gt;

&lt;!-- &lt;a id="" href="rio.html" title="Kia Rio 1.5 Crdi" accesskey="1"&gt;&lt;/a&gt; --&gt;
&lt;p&gt;&lt;img align="right" alt="rio" id="imagerio" title="rio" src="images/rio.jpg" width="180" height="105"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="rio.html"&gt;&lt;strong&gt;Kia Rio 1.5 CRDi:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&amp;pound;28.00 per day&lt;p&gt;
&amp;pound;155.00 week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer  diesel manual 4"&gt;
&lt;!-- &lt;a id="" href="sportage.html" title="Kia Sportage 2 1.7 Manual CRDi" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="Kia Sportage" id="imagesport" title="Kia Sportage 1.7 CRDi" src="images/sportage.jpg" width="210" height="130"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="sportage.html"&gt;&lt;strong&gt;Kia Sportage 2 1.7 CRDi:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;£45.00 per day&lt;br /&gt;
&amp;pound;120.00 per 3 days&lt;br /&gt;
£250.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer diesel manual van"&gt;

&lt;!-- &lt;a id="" href="kangoo.html" title="Renault Kangoo Van SL17 Dci70+" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="Renault Kangoo Van SL17 Dci70+" id="imagekang" title="Renault Kangoo Van" src="images/kangoo.jpg" width="190" height="100"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="kangoo.html"&gt;&lt;strong&gt;Renault Kangoo Van SL17 Dci70+:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&amp;pound;26.50 per day&lt;p&gt;
&amp;pound;150.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer diesel auto car"&gt;

&lt;!-- &lt;a id="" href="ceed.html" title="Kia Ceed sports tourer CRDi" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="Kia Ceed Sports Tourer" id="imageceedst" title="Kia Ceed sports tourer" src="images/ceed.jpg" width="210" height="90"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="ceed.html"&gt;&lt;strong&gt;Auto. Kia Ceed Sports Tourer CRDi :&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&amp;pound;35.00 per day&lt;p&gt;
&amp;pound;200.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer diesel auto 4"&gt;

&lt;!-- &lt;a id="" href="sportageauto.html" title="Kia Sportage KX2 2.0 Auto 4X4" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="Kia Sportage" id="imageautosport" title="Kia Sportage 1.7 CRDi" src="images/sportage.jpg" width="210" height="130"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="sportageauto.html"&gt;&lt;strong&gt;Auto. Kia Sportage KX2 2.0 4X4:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;&amp;pound;50.00 per day&lt;br /&gt;
&amp;pound;125 per 3 days&lt;br /&gt;
&amp;pound;270.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer diesel auto 7"&gt;

&lt;!-- &lt;a id="" href="newgalaxy.html" title="New Automatic Galaxy 2.0 TDi" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="New Auto Galaxy" id="imagegal" title="New Automatic Galaxy 2.0 TDi" src="images/newgalaxy.jpg" width="240" height="150"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="newgalaxy.html"&gt;&lt;strong&gt;Auto. Ford Galaxy 2.0 TDI 7 Seater:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;&amp;pound;65.00 per day&lt;br /&gt;
&amp;pound;165 per 3 days&lt;br /&gt;
&amp;pound;310.00 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="modelContainer diesel auto 7 4"&gt;

&lt;!-- &lt;a id="" href="sorento.html" title=
Kia Sorento 4X4 Automatic" accesskey="1"&gt;&lt;/a&gt;--&gt;
&lt;p&gt;&lt;img align="right" alt="sorento" id="imagesor" title="Kia Sorento 4X4" src="images/sorento.jpg" width="300" height="200"&gt;&lt;/img&gt;&lt;/p&gt;
&lt;div class="c2"&gt;&lt;big&gt;&lt;a href="sorento.html"&gt;&lt;strong&gt;Auto. Kia Sorento KX3 CRDi 4X4 7 Seater:&lt;/strong&gt;&lt;/a&gt;&lt;/big&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;&amp;pound;70 per day&lt;br /&gt;
&amp;pound;180 per 3 days&lt;br /&gt;
&amp;pound;360 per week&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>thanks</p>
