How do I determine if truncation is being applied in my style through JS?
Posted
by Avry
on Stack Overflow
See other posts from Stack Overflow
or by Avry
Published on 2010-05-29T14:44:15Z
Indexed on
2010/05/29
16:22 UTC
Read the original article
Hit count: 424
I am applying truncation using CSS styles:
.yui-skin-sam td:not(.yui-dt-editable) .yui-dt-liner{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-moz-binding: url('ellipsis.xml#ellipsis');
}
.yui-skin-sam td[class~=yui-dt-editable] .yui-dt-liner{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
(Sidenote: I'm not sure if this is the best way to write my CSS. This is a Firefox specific workaround since truncation on Firefox only sort-of works).
I want a tool-tip to appear over text that is truncated. How do I detect if text is truncated so that I can display a tool-tip?
© Stack Overflow or respective owner