title: Play youtube video on hover
body: <p>I just need to play the youtube video only when hovered</p>
  
  <p>I have here a fiddle and can't get it to work.</p>
  
  <pre><code>$(document).ready(function(){
    $(function() {
  
        var playersrc = jQuery(iframe).attr('src');
  
            $('div').hover(function(){
            $('iframe').attr('src',playersrc+'&amp;autoplay=1');
        }, function(){
            $('iframe').attr('src',playersrc);
        });
    });       
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/rhr5p0pg/2/" rel="nofollow noreferrer">https://jsfiddle.net/rhr5p0pg/2/</a></p>
  
  <p>updated fiddle: <a href="https://jsfiddle.net/rhr5p0pg/4/" rel="nofollow noreferrer">https://jsfiddle.net/rhr5p0pg/4/</a></p>
  
  <p>now it plays all and when your mouse leaves the it does not go back to its originial video</p>