title: JavaScript / CodeMirror - refresh textarea
body: <p>How do I use the refresh function from CodeMirror 2?</p>
  
  <p><strong><em><a href="http://codemirror.net/2/manual.html" rel="noreferrer">refresh()</a></em></strong></p>
  
  <blockquote>
    <p>If your code does something to change
    the size of the editor element (window
    resizes are already listened for), or
    unhides it, you should probably follow
    up by calling this method to ensure
    CodeMirror is still looking as
    intended.</p>
  </blockquote>
  
  <p>I want to refresh all textareas after a link is clicked</p>
  
  <p>I tried</p>
  
  <pre><code>  $('.CodeMirror').each(function(){
      getElementById($(this).attr('id')).refresh();
    });
  </code></pre>
  
  <p>but it doesn't work....</p>