title: How to properly block a div with a loading animation
body: <p>I have an ajax function that I am calling.  While the Webserver is churning away on the Assynchronous request I want to block the div the user is view so he doesn't press any buttons or anything while that request is going on... I have done this before, and you simply would pick the dive you want to block with an animation, call .block and then when values successfully return you would simply unblock.  Like so...</p>
  
  <pre><code>function animateSpinner() {
      $("#list").block({ message: '&lt;img src="../../Images/ajax-loader.gif" /&gt;' });
  };
  </code></pre>
  
  <p>and then simply call</p>
  
  <pre><code>$("#list").unblock({ message: '&lt;img src="../../Images/ajax-loader.gif" /&gt;' });
  </code></pre>
  
  <p>once you successfully return.<br>
  however, I am getting this exception whenever I attempt to do this...<img src="https://i.stack.imgur.com/IGSvK.png" alt="enter image description here"></p>
  
  <p>That is for the unblock part of it.  Which I forgot to comment out (I was simply testing the ajax portion of this.<br>
  Should these kind of calls be wrapped in a document.ready or something to ensure that they should be called.  I recently have had issues with ajax submits not working because they were not wrapped in $(document).ready calls and I would like to see if this is another instance of when something should be wrapped in that call?</p>