I've searched but I can't seem to find an answer on how to do this.
I'd like to be able to determine what text is hidden/invisible while using overflow: hidden in a div. I'm trying manage some pagination when the screen is printed.
In the (simplified) example below I'd like to be able to determine what text from div-1 isn't visible so it can be moved to div-2 via javascript or jQuery.
// css
.divs {
width: 250px;
overflow: hidden;
white-space: nowrap;
}
// html
<div class="divs" id="div-1">
This is some text that I can see ...
but this text is not visible due to overflow: hidden
</div>
<div class="divs" id="div-2"></div>