I have a HTML page which is structured in two parts (div), a header and a container part in which some text is displayed. The text in the container part is large, and it is scrollable. I need to get the exact same text displayed on the window and to perform some actions on the displayed text, such as highlight an element. I have found something about getting the scroll position, but what I need is the actual content starting at that position. It is possible to obtain that? Thanks.
Asked
Active
Viewed 347 times
0
-
1Have you tried anything? Can you provide an example jsfiddle or plnkr? – 23tux Jul 03 '14 at 10:22
-
Please show us what you have tried so far :) – aniri Jul 03 '14 at 10:27
-
It is not duplicate, becaus I want the text at some position, ant there he wants the position of some text. – georgiana_e Jul 03 '14 at 10:28
-
I don't have a code on how to get the text, because I did not find anything. I have mentioned that I found ho to get the position (x, y) but not the content. – georgiana_e Jul 03 '14 at 10:37
-
I have found what I need here: http://stackoverflow.com/questions/119441/highlight-a-word-with-jquery – georgiana_e Jul 03 '14 at 11:16