title: Register a click except on a certain element
body: <p>I have a javasccript function that shows or hides "spans" when I click an input to show hints when a user fills out forms:</p>
  
  <pre><code>function prepareInputsForHints() {
  var inputs = document.getElementsByTagName("input");
  
  for (var i=0; i&lt;inputs.length; i++){
      // test to see if the hint span exists first
      if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
          // the span exists!  on focus, show the hint
          inputs[i].onfocus = function () {
              this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
          }
          // when the cursor moves away from the field, hide the hint
          inputs[i].onblur = function () {
              this.parentNode.getElementsByTagName("span")[0].style.display = "none";
          }
      }
  }
  }
  </code></pre>
  
  <p>My problem is that when I try to add a link to the hints text, the user cannot click it because it registers first with the onblur event and the hint dissapears, so I would like to know how to modify this function so that it does not hide when I click the hint.</p>