title: Jquery variables error
body: <p>I am having an issuse with my code.</p>
  
  <p>I have an input box that displays a buttons value on click.
  I want for when you press a button for the value currently displayed in the input box to be stored in a variable and for it to then update and store the new button variable.</p>
  
  <pre><code>$('.action').on('click', function(){
      var action = $(this).val();
      alert('the newAction is:  '+ action);
  });
  </code></pre>
  
  <p>num1 would contain the value and the action?</p>