title: How to call CSS animation manually with Javascript?
body: <p>I'm using a UIWebView with CSS animations, which animates the main body when it loads from alpha 0 to 1:</p>
  
  <pre><code> NSString *HTML = [NSString stringWithFormat:@"&lt;html&gt; \n"
                        "&lt;head&gt; \n"
                        "&lt;style type=\"text/css\"&gt; \n"
                        "@-webkit-keyframes fadeIn {from {opacity: 0;-webkit-transition: opacity;}to {opacity: 1;}} \n"
                        "body {\n"
                        "-webkit-animation-name:fadeIn;\n"
                        "-webkit-animation-duration: 1.5s;\n"
                         ...
  </code></pre>
  
  <p>My question is, how would I call this animation manually using Javascript so that at any time, if I call the JS, the view animates from 0 to 1 (rather than just animating on load)? Or is this not possible with CSS?</p>
  
  <p>Basically I want to do this: </p>
  
  <pre><code>[mainWebView stringByEvaluatingJavaScriptFromString:@"/*animate*/"];
  </code></pre>