I have a div, which has the css to truncate the text for certain width. The text gets truncated with ellipsis. However the inner text is the same. For the testing purpose I would want to read the truncated ellipsis text. Can I get the truncated ellipsis text with js?
@media (max-width: 1129px) {
#mydiv {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
display: inline-block;
}
}