title: jquery animation for fadein and fadeout
body: <p>I'm gonna add the animation for div tag such as fadein and fadeout.<br>
  When the user putting the mouse on the div tag, that one will be faded out.<br>
  When the user putting the mouse out of the div tag, that one will be faded in.<br>
  This is test code.  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>          $('#div1').mouseleave(function(){
              $('#div1').fadeIn();
              console.log("out");
            });
  
            $('#div1').mouseover(function(){
              $('#div1').fadeOut();
              console.log("in");
            });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="div1"&gt;hover over me&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But when the user put the mouse on the div tag, the animation is repeated.<br>
  How could I fix this?  </p>