title: if elem is clicked, detect if form elems have changed, if so #anchor
body: <ul>
  <li>I am trying to check first if my elem '<code>update</code>' has been clicked.</li>
  <li><em>If</em> it has, I'd like to run a function that will detect <em>if</em> any of my
  '<code>form</code>' elements have changed. On <em>change</em> function.</li>
  <li>If a form element has <em>changed</em>, I'd like to fire my <code>jumptoUpdate();</code>
  function, which would scroll the user back down to my '<code>update</code>' elem.</li>
  <li>I need this to run continuously, in case the user keeps changing a
  for elem; if so anchor down to '<code>update</code>' elem each time.</li>
  <li>But this should only run <em>AFTER</em> my '<code>update</code>' elem has been clicked
  once.
  
  <hr></li>
  </ul>
  
  <p><strong>Below is my attempt.</strong></p>
  
  <pre><code>// if user has clicked 'update' then begin check on change
      document.addEventListener('click', function (event) {
  
        const goCheckR = document.getElementById('update');
        let el = event.target;
        while(el &amp;&amp; el !== goCheckR) el = el.parentElement;
        if(!el) return;
  
          function jumptoUpdate(){
              var top = document.getElementById("update").offsetTop;
              window.scrollTo(0, top);
          }
  
          addEventHandler(document, 'DOMContentLoaded', function () {
                  addEventHandler(document.getElementById('mainform'), 'change', 
  
                  function() {
                      setInterval( jumptoUpdate, 500);
                  });
               });   
  
          console.log(event.target);
  
      }, false);
  </code></pre>
  
  <p><em>Vanilla JS (no jQuery or libs)</em></p>