I have a webpage with an elastic layout that changes its width if the browser window is resized.
In this layout there are headlines (h2) that will have
h2
Here's another JavaScript solution. Works very good and very fast.
https://github.com/dobiatowski/jQuery.FastEllipsis
Tested on Chrome, FF, IE on Windows and Mac.