title: Detect when user clicks outside of textarea but not outside of element
body: <p>I have a textarea, and a submit button. When a user clicks outside of the textarea a script is run, and if there is nothing in the textarea, it hides the submit button. However, I don't want it to be if you click outside of the textarea because when you click the submit button it runs the action, and hides the button. which it shouldn't. So I need to detect when the user clicks outside of the wrapper div of the textarea and submit button and run the script.</p>
  
  <pre><code> &lt;div class="wrapper"&gt;
       &lt;textarea class="textarea"&gt;&lt;/textarea&gt;
       &lt;input type="submit" class="submit" value="submit"/&gt;
   &lt;/div&gt;
  </code></pre>