title: How to update jQuery value as you type?
body: <p>I have a jQuery QR Code generator that creates an image of a QR code based on the text you type into an <code>input</code>. The QR code and image source updates in real time as you alter your input. </p>
  
  <p>What I need is to take the <code>src</code> of the image and place it in its own input that updates as you type. I was able to get the value of the <code>src</code> using this:</p>
  
  <pre><code>var imageSRC = $('.qr-preview img').attr('src');
  $('input#code_img_src').val(imageSRC);
  </code></pre>
  
  <p>This works perfectly fine, however it only applies the value of the image when the PAGE LOADS, not each time the <code>img src</code> changes. Is there a way to make it so that every time the <code>src</code> changes that function updates in real time? I'm probably overlooking something simple here, and I've researched things like <code>setInterval</code> but I that's not exactly what I'm looking for. Any help would be greatly appreciated.  </p>