Supposing I have some random block of text in a single line. Like so
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
But for whatever reason (width settings on the containing element, use of text-zoom etc.), on the viewer's screen it displays as two or more lines.
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
or
Lorem ipsum dolor sit
amet, consectetur
adipiscing elit.
Is there any way to find out via javascript where those line-wraps happen?
$('p').text() and $('p').html() return Lorem ipsum dolor sit amet, consectetur adipiscing elit. regardless of how the text is displayed.