It's not the world's most powerful piece of code, but I think I like this one the most...
// Takes DOM element, returns boolean
// tests if element's text has been truncated
function isTruncated(el) {
return (el.scrollWidth > el.clientWidth);
}
(I got this from Jason Berry: http://output.jsbin.com/ulajif/2)
Couple of reasons I like this: