$(element).hover( function () { $(this).css('margin-left', '1em'); }, function () { $(this).css('margin-left', '-9999em'); } );