$(document).on({ mouseenter: function(e) { $(this).css('background-position','0px top'); }, mouseleave: function(e) { $(this).css('background-position','-41px top'); } }, '.panel:not(.active)');