how do i get the first line offset of inline elements with multiple line?
Hello,
I need some help for getting first line coordinates of multiple line inline element.
Example HTML
- aaa bbb ccc ddd <span id="target">eee fff ggg
- hhh iii jjj</span>kkk lll mmm nnn ooo ppp qqq
- $(document).ready(function() {
- $(#target).click(function(){
- alert($(this).offset().left);
- });
- });
Assume that span#target has a line break, when I see a browser. Then I click span#target, above function returns the head of coordinates which second line ("hhh") has. I want to have the coordinates which first line ("eee") has.
How can I get that?