title: Google spreadsheet trigger for hiding and showing row
body: <p>Currently, I use onEdit and it is being called when I change values in a cell or range of cells, or when deleting, inserting rows/columns.</p>
  
  <pre><code>function onEdit(e) {
    Browser.msgBox('edit: ' + (e.range &amp;&amp; e.range.getA1Notation()));
  }
  </code></pre>
  
  <p>The onEdit function is not being called when hiding or showing a row through the UI.</p>
  
  <p>Is there a way to get my script to be notified of a hide/show row event?</p>
  
  <p><em>Update: I wrote a feature request for this in google-apps-script-issues:</em>
  <a href="https://code.google.com/p/google-apps-script-issues/issues/detail?id=4670" rel="nofollow noreferrer">https://code.google.com/p/google-apps-script-issues/issues/detail?id=4670</a></p>
  
  <p><em>Update: As per Kriggs answer, the installable trigger onChange can be used</em></p>
  
  <p>Here's how that works.
  <img src="https://i.stack.imgur.com/0jGCF.png" alt="enter image description here"></p>
  
  <p>However, on the e (event) object, there's no range property from which to see what row/range was hidden or shown. Also Krigg's suggested <code>Row</code> method does not exist on <code>e.source</code>.</p>
  
  <p>How can we leverage onChange to also get the row number(s) hidden or shown?</p>