JQuery - combine toggle hover with on
<p>How can I combine toggle hover with on event? The code:</p>

<pre><code>img.on('hover', function(){
            name = $(this).attr('title');
            function(){
              $(this).parent().append('&lt;figcaption&gt;' + name);
            },
            function(){
              $(this).find('figcaption').remove();
            }
          });
</code></pre>
