to replace .live()

The an implementation of .liv() w/ hover done using the .on() method.

by Dylan Schadeck

HTML

<div id="foo">abc</div>

JavaScript

var val=$('#foo').html();
$(document).on('hover', '#foo', function(ev) {
    $(this).html((ev.type == 'mouseenter') ? 'test' : val);
});