title: How to reset preview after setting aspect ratio on Cropper by fengyuanchen
body: <p>I'm one tiny detail away from getting the awesome cropper (fengyuanchen - GitHub) working how I need it. I'm able to programmatically set the aspect ratio when my form loads, but this breaks the preview window. I've checked out the documentation where I can but sadly I'm not versed in JQuery enough to be able to make sense of it. Here's my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="col-md-9"&gt;
      &lt;div class="img-container"&gt;
      &lt;img id="image" src="test.jpg" alt="Picture" runat="server" /&gt;&lt;!-- ############# IMAGE ###########--&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-3"&gt;
      &lt;div class="docs-preview clearfix"&gt;
      &lt;div class="img-preview preview-lg"&gt;&lt;/div&gt;&lt;!-- preview image--&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and my javascript/jquery which runs after the page has loaded:</p>
  
  <pre><code>function aspect() {
      var $image = $('#image');
      var $preview = $('img-preview');
      var asp = document.getElementById('hidAspectRatio').value;
      $image.cropper('setAspectRatio', asp);
      //$preview('resetPreview');
      return false;
  }
  </code></pre>
  
  <p>the commented out line is where I think I need to call something which resets the preview div, but I can't figure out what I should call. Any help greatly appreciated</p>