title: AMP: easy way to toggle a CSS class?
body: <p>I'm build an Accelerated Mobile Page (AMP) template and was wondering if there is an easy way of toggling a CSS class on tab.</p>
  
  <p>I know about stuff like:  </p>
  
  <pre><code>&lt;h2 
    class="headline"
    on="tap:list.toggleVisibility"
  &gt;
  &lt;ul id="list"&gt;&lt;/ul&gt;
  </code></pre>
  
  <p>But this writes inline-styles - I'd rather toggle a custom CSS class but couldn't find an example on the AMP page.</p>
  
  <p><code>AMP.setState</code> with bindings like <code>&lt;h2 [class]="myclasses"&gt;</code> looked like the way to go but manipulating the state is pretty hard with the tools they give you ...</p>