Deff,
можно чуть покороче ...
<script src="http://code.jquery.com/jquery-latest.js"></script>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<span>Err1</span>
<span>Err3</span>
<span>Err2</span>
<span>Err3</span>
<span>Err2</span>
</div>
<script type="text/javascript">
var obj={};
$('div.alert > span:contains("Err")').each(function (i,el) {
obj[$(el).html()]?$(el).remove():obj[$(el).html()]=!0;
});
</script>