title: JS execute in order with ajax
body: <p>How can I control the JS executes in order with ajax? Here is my code:</p>
  
  <pre><code>function forexample() {
    $(".bewait").css("display", "block");
    ajaxrequest();  // here is a ajax request method. 
                    // I also added "async: false" in the method.
    $(".bewait").css("display", "none");
  }
  </code></pre>
  
  <p>when I run the <code>forexample()</code>, it works correctly in Firefox, but I found the chrome did not, it seems chrome runs the ajax method firstly, then runs the css control js together. </p>
  
  <p>How can I fix it to run correctly in chrome?</p>