title: Why event mouseenter fires twice in JavaScript
body: <p>Demo: <a href="http://jsfiddle.net/alexpts/4res6aey/9/" rel="nofollow noreferrer">jsfiddle</a></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>var $item = $('.item');
  var $img = $item.find('img');
  
  var handler = function(event) {
    console.log('fired');
    $img.remove(); // remove child
  };
  
  var handlerRestore = function() {
    $item.append($img);
  };
  
  /// double fired event on chrome, safari, firefox
  $('.item').mouseenter(handler);
  $('.item').mouseleave(handlerRestore);
  
  // one fired event on chrome, but double fired on firefox and safari
  //$('.item')[0].onmouseenter = handler;
  //$('.item')[0].onmouseleave = handlerRestore;</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.item {
    background: #EFEFEF;
    display: inline;
    float: left;
    height: 300px;
    margin: 0 10px 80px 0;
    position: relative;
    width: 300px;
    transition: opacity 0.6s ease;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  
  .item img {
    margin: auto;
    max-height: 300px;
    max-width: 300px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="item"&gt;
    &lt;img src="http://img.ifcdn.com/images/237b9b19a8cc0ea78a3b32b567423a4cd0acf77fb19b8c5a485325e2252a7b7a_1.jpg" /&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Questions:</p>
  <ol>
  <li>Why event fires twice?</li>
  <li>Why native-event fires once in Chrome, but jquery-event fires twice in Chrome?</li>
  <li>How it fix?</li>
  </ol>
  <p>Firefox and Safari fired twice native-event also so jquery-event.
  I think it is wrong.</p>