title: Using .data() to set variable
body: <p>I'm trying to set a variable in a form using .data() and cannot get it to work as I cannot get any output for the variable "fee", I only see a blank. 
  Ideally the user would select a Type, enter a footage, and then select either 25% or 50%. Each percentage is tied to a different data entry for the Type selected (either hp or lp). Then the data type selected would be plugged into a data() selector to pull out a value for "fee". I can get all the other variable to display an amount except this one so I'm thinking this must be where I'm going wrong.  I'm not sure what I am doing wrong so any input would be greatly appreciated! Thanks!</p>
  
  <p>Here is the JSFiddle - <a href="http://jsfiddle.net/gv0029/g78bG/2/" rel="nofollow">http://jsfiddle.net/gv0029/g78bG/2/</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;select class="pSelectP" id="pPost_D"&gt;
      &lt;option value="select"&gt;Type&lt;/option&gt;
      &lt;option data-hp="5" data-lp="2" value="Type 1"&gt;Type 1&lt;/option&gt;
  &lt;/select&gt;
  &lt;br/&gt;
  &lt;input id="pPost_F" class="pSelectQ" placeholder="Footage" /&gt;
  &lt;br/&gt;
  &lt;select id="pPost_P" placeholder="Percentage"&gt;
      &lt;option value="lp"&gt;25%&lt;/option&gt;
      &lt;option value="hp"&gt;50%&lt;/option&gt;
  &lt;/select&gt;
  &lt;br/&gt;
  &lt;input id="pPost_C" placeholder="Cost" /&gt;
  &lt;br/&gt;
  &lt;input id="pPost_A" placeholder="Total" /&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document.body).on('keypress keydown keyup change', '[class="pSelectP"] , [class="pSelectQ"]', function () {
      if ($('#manualOverrideNo').prop('checked')) {
          var parts = $(this).attr('id').split("_"),
              service = parts[0],
  
              footage = parseFloat($("#" + service + "_F").val(),  
                                   10),
              percentage = $("#" + service + "_P").val(),
              fee = parseFloat($("#" + service + "_D").data("'" + 
                    percentage + "'"), 10),
              cost = $("#" + service + "_C"),
  
  
              amount = '',
              finalAmount = '';
  
  
          if (isNaN(footage)) {
              total.val("Please enter Quantity");
          }
  
          if (!isNaN(footage) &amp;&amp; (!isNaN(Number(fee)))) {
              amount = Math.ceil(footage * fee);
              total.val(amount);
              cost.val(fee);
          }
  
  
      }
  
  });
  </code></pre>