title: Compare Select Options
body: <p>I'm trying to compare the values of two select options and present a third value based on the two selected options. I found <a href="https://stackoverflow.com/questions/6529797/jquery-join-two-form-select-elements-into-one-value-then-change-that-value-using">this example on Stack Exchange</a>: </p>
  
  <p>But can't seem to get it to work. My own code is below:</p>
  
  <pre><code> $('#forest-size', '#forest-age').change(function() {
            var val =  $('#forest-size').val() + $('#forest-age').val(), 
           initial_crediting;
  
           switch (val) {
  
            case "A1" : 
                initial_crediting = "0 - 10";
                break;
  
            case "A2" : 
                initial_crediting = "0 - 10";
                break;
  
            case "B1" : 
                initial_crediting = "0 - 8";
                break;
  
            case "B2" : 
                initial_crediting = "10 - 18";
                break;
  
            case "B3" : 
                initial_crediting = "18 - 24";
                break;
  
            case "C1" : 
                initial_crediting = "20 - 30";
                break;
  
            case "C2" : 
                initial_crediting = "30 - 40";
                break;
  
            case "C3" : 
                initial_crediting = "40 - 50";
                break;
           }
  
            $('#results').text(initial_crediting);
        });
        &lt;/script&gt;
  </code></pre>
  
  <p>So far, I'm not displaying a value in #results, and yet, I don't see any errors in the console. Any advice would be greatly appreciated.</p>
  
  <p>Thanks!</p>