title: Change result input based on dropdown option - jQuery + HTML
body: <p>I'm trying to build up a calculator using HTML and jQuery. So far I have:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="#" id="calc" method="post"&gt;
      &lt;div class="item-1"&gt;
          &lt;label for="item-1"&gt;Item 1&lt;/label&gt;
          &lt;input class="income" id="item-1" size="50" /&gt;
          &lt;select id="select-item-1" class="select"&gt;
              &lt;option value="daily"&gt;Daily&lt;/option&gt;
              &lt;option value="weekly"&gt;Weekly&lt;/option&gt;
              &lt;option value="monthly"&gt;Monthly&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="item-2"&gt;
          &lt;label for="item-2"&gt;Item 2&lt;/label&gt;
          &lt;input class="income" id="item-2" size="50" /&gt;
          &lt;select id="select-item-2" class="select"&gt;
              &lt;option value="daily"&gt;Daily&lt;/option&gt;
              &lt;option value="weekly"&gt;Weekly&lt;/option&gt;
              &lt;option value="monthly"&gt;Monthly&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="item-3"&gt;
          &lt;label for="item-3"&gt;Item 3&lt;/label&gt;
          &lt;input class="income" id="item-3" size="50" /&gt;
          &lt;select id="select-item-3" class="select"&gt;
              &lt;option value="daily"&gt;Daily&lt;/option&gt;
              &lt;option value="weekly"&gt;Weekly&lt;/option&gt;
              &lt;option value="monthly"&gt;Monthly&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;hr /&gt;
      &lt;div class="grand-total"&gt;
          &lt;label for="grand-total"&gt;Total :&lt;/label&gt;
          &lt;input id="grand-total" size="50" disabled /&gt;
          &lt;select id="grand-total-filter" class="select"&gt;
              &lt;option value="daily"&gt;Daily&lt;/option&gt;
              &lt;option value="weekly"&gt;Weekly&lt;/option&gt;
              &lt;option value="monthly"&gt;Monthly&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>SCRIPT</strong></p>
  
  <pre><code>var $form = $('#calc'),
      $summands = $form.find('.income'),
      $sumDisplay = $('#grand-total');
  
      $form.delegate('.income', 'change', function (){
          var sum = 0;
          $summands.each(function () {
              var value = Number($(this).val());
              if (!isNaN(value)) sum += value;
      });
  
      $sumDisplay.val(sum);
  });
  
  $("#grand-total-filter").change(function() {
          var e = document.getElementById("grand-total-filter");
          var strUser = e.options[e.selectedIndex].value;
          if (strUser == 'monthly' ) {
              // Monthly
          } else if (strUser == 'weekly' ) {
              // Weekly
          } else {
              //  Default (Daily)
          }
      });
  </code></pre>
  
  <p>Here is a working jsFiddle with the above bits: <a href="http://jsfiddle.net/4Q8Gh/1/" rel="nofollow">http://jsfiddle.net/4Q8Gh/1/</a></p>
  
  <p>The idea is that the end user should be able to add the values (item1, item2 and item3) with any option (daily, monthly, weekly) - individually - so item1/item2/item3 could have any option (daily, weekly, monthly).</p>
  
  <p>The results should be displayed by default in "daily" value and the result input can be once again filtered by any of the options: daily, weekly, monthly.</p>
  
  <p>So for example we have:</p>
  
  <ol>
  <li>item1 = 10 (daily)</li>
  <li>item2 = 100 (weekly)</li>
  <li>item3 = 1000 (monthly)</li>
  </ol>
  
  <p>That gives us a TOTAL* of :</p>
  
  <ul>
  <li>Daily: 10 + (100/5) + (1000/20) = 80</li>
  <li>Weekly: (10*5) + 100 + (1000/4) = 400</li>
  <li>Monthly: (10*20) + (100*4) + 1000 = 1600</li>
  </ul>
  
  <p>*based on the above example and considering that 1 week = 5 working days and 1 month = 4 weeks</p>
  
  <p>At this point I'm lost and I'm not sure how can I throw these ideas into code using jQuery, so any help/guidance would be much much appreciated. Thanks in advance for any feedback!</p>
  
  <p>P.S. If my approach is not correct for any reason I would be more than happy to hear your suggestions.</p>