$(function(){ $('a.flex').on('mouseover mouseout', function(e) { $('.inner, span.after', this).stop(true, true).animate({opacity: 0.88 * (e.type == 'mouseover')}, 200); } });