remove specific text from element

by Ian Roberts

HTML

<div class="newsAuthor">By Ian</div>

JavaScript

//remove specific text from element w/ class

$('.newsAuthor:contains("By ")').each(function(){
    $(this).html($(this).html().split("By ").join(""));
});