$('.upcoming-events-wrapper span:contains("All day")').each(function(){ $(this).html($(this).html().split("All day").join("")); });