title: Change some parts of anchor "onclick" attribute from inputs
body: <p>I need to change the onclick attribute in the  link using the text inputs Name and Phone. I planned to do this with Jquery. I used the keyup function and I understand how to change the attribute with 1 field, but I can't figure out how to use 2 or more fields?</p>
  <pre><code>&lt;input id=&quot;name&quot; type=&quot;text&quot;&gt;
  &lt;input id=&quot;phone&quot; type=&quot;text&quot;&gt;
  &lt;a id=&quot;paybtn&quot; onclick=&quot;ipayCheckout({
    amount:50,
    currency:'USD',
    order_number:'',
    description: 'Description from input name + input phone'},
    function(order) { showSuccessfulPurchase(order) },
    function(order) { showFailurefulPurchase(order) })&quot;
    class=&quot;btn btn-primary text-white&quot;&gt;Submit
  &lt;/a&gt;
  
  &lt;script&gt;
    $(function(){
  
      var title = $('title').text(); 
      var name = $(&quot;#name&quot;).val(); // How to get and set this value on keyup?
      var phone = $(&quot;#phone&quot;).val(); // How to get and set this value on keyup?
  
      $(&quot;#paybtn&quot;).attr(&quot;onclick&quot;,&quot;ipayCheckout({ amount:50, currency:'USD', order_number:'', description: '&quot; + title + name + phone + &quot;'}, function(order) { showSuccessfulPurchase(order) }, function(order) { showFailurefulPurchase(order) })&quot;);
  
    });
  &lt;/script&gt;
  </code></pre>