title: Getting input value from a data attribute
body: <p>I have this code below where user can choose - each dropdown option has different data-tenure:</p>
  
  <pre><code>&lt;div class="ten columns"&gt;
    &lt;p class="slider-label"&gt;Loan Tenure (Years)&lt;/p&gt;
    &lt;!-- &lt;input type="text" class="loan-tenure numeric-only" /&gt; --&gt;
    &lt;div class="field"&gt;
      &lt;div class="picker picker-dd2"&gt;
        &lt;select class="dropdown2 loan-tenure"&gt;
          &lt;option class="dropdown2-opt" data-tenure=“0.0298” value="1"&gt;1&lt;/option&gt;
          &lt;option class="dropdown2-opt" data-tenure=“0.0387” value="2"&gt;2&lt;/option&gt;
          &lt;option class="dropdown2-opt" data-tenure=“0.0418” value="3"&gt;3&lt;/option&gt;
          &lt;option class="dropdown2-opt" data-tenure=“0.0434” value="4"&gt;4&lt;/option&gt;
          &lt;option class="dropdown2-opt" data-tenure=“0.0444” value="5"&gt;5&lt;/option&gt;
        &lt;/select&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want is to set the input value to the data-tenure above - :</p>
  
  <pre><code>                &lt;input type="hidden" class="loan-rate" value="??" /&gt;
  </code></pre>
  
  <p>Do I need to add onchange() function to the dropdown above?</p>