title: Can I set html class dynamically? Or how does Shiny set 'html'.hasClass('Shiny-busy')?
body: <p>So this is more of a conceptual question in response to getting a 'busy' notification working on my shiny app using the:  </p>
  
  <pre><code>conditionalPanel(
          condition="$('html').hasClass('shiny-busy')",
          img(src="images/busy.gif"))  
  </code></pre>
  
  <p>I've gotten a animation gif to show during an initial query to a database, but it becomes unpredictable after that. I added in a second conditionalPanel with to hide the output graph if a new database call is made:</p>
  
  <pre><code>conditionalPanel(
       condition="!($('html').hasClass('shiny-busy'))",
       plotOutput("Some Graph"))  
  </code></pre>
  
  <p>The setup works through the second data pull, but if a third data base query is made, 'Some Graph' no longer hides and 'busy.gif' is no longer shown.  It does flash up as a new plot is loaded.  </p>
  
  <p>So my overarching question is:<br>
  Is there a way to explicitly set the html class in server?<br>
  OR<br>
  How/when does Shiny set the class value?</p>