Is there a way to get, let say, the 5th line ( the offset of its first letter ) of a block’s content using jQuery ?
I mean the visual line, the browser computed line, and not the line in the source code .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jQuery.fn.line:
Usage:
Example: http://jsbin.com/akave
How it works:
It goes through the entire element (actually, a clone of the element) inserting a
<span/>element within each word. The span’s top-offset is cached – when this offset changes we can assume we’re on a new line.