I need to find the position of a text in webpage, i.e. at what height is that text written on a webpage.
We can find the position of elements with their class names, example: to find position of element with class name 'demo_class' using below code
var xt = $('.demo_class').position()
The above code will give you the value of xt as below:
{top: 9606.859375, left: 15}
Similarly, i need to find the position of text 'Find position of this text' from top of webpage, something like
var xt = $('Find position of this text').position()