Ran across an annoying little bug in IE8. It seems that, for all other browsers and IE9+, this will work fine:
var thisE = $(this).text().trim();
But if you want it to work in IE8-, you need to do this:
var thisE = $.trim($(this).text());
Just another reason I
love loathe IE.