Hover effects

Pass one function to run on enter and one on leave.

jQuery · Hover effectsBeginner
$('.card').hover(
  function () { $(this).addClass('hovered'); },       // mouse enters
  function () { $(this).removeClass('hovered'); }     // mouse leaves
);

// or the same with on():
$('.thumb').on('mouseenter mouseleave', function (e) {
  $(this).toggleClass('zoom', e.type === 'mouseenter');
});
hovermouseentermouseleave