I am wondering if there is any way with Javascript to get a text when it's out of its own <div>
. For example if a text is made of 3 sentences, and the last one is only halfy displayed, is there a way to get the entire last sentence, or the first word that isn't displayed with JavaScript ?
Example :
HTML
<div>loooooong loooooong text. Second sentence. Third sentence</div>
CSS
div {
max-width: 60px;
max-height: 50px;
overflow: hidden;
text-overflow: ellipsis;
}