title: Append to value attribute on button click
body: <p>I am trying to make an input modify each time I click on a button. Kind of like a calculator. The  will start at 0. When I click on the button &quot;7&quot; it will change its value to <strong>7</strong>, when I click on &quot;4&quot; it will change to <strong>74</strong>. Basically like a calculator.</p>
  <p>I made this code that does modify the <em>value</em> of the input, however I can't seem to find how I can <em><strong>append</strong></em> more values to that values. Here is my code. Could someone help me?</p>
  <pre><code>&lt;input class=&quot;normal-input&quot; type=&quot;number&quot; step=&quot;0.01&quot;&gt; &lt;!-- Value is NULL--&gt;
  &lt;button value=&quot;7&quot; class=&quot;my-buttons&quot; type=&quot;button&quot;&gt; 7 &lt;/button&gt; &lt;!--Button to change the value of the input--&gt;
  
   $('.my-buttons').click(function(){
       $(&quot;.normal-input&quot;).attr(&quot;value&quot;, $(this).attr('value'));
   }); &lt;!-- The actual function. --&gt;
  </code></pre>
  <p>As you can see the function completely replaces the previous value for the new one. I want it to append the values like in a calculator.</p>