Show More
@@ -46,8 +46,9 b' function addRefLinkPreview(node) {' | |||
|
46 | 46 | |
|
47 | 47 | function showPostPreview(e) { |
|
48 | 48 | var doc = document; |
|
49 | //ref id | |
|
50 | var pNum = $(this).text().match(/\d+/); | |
|
49 | ||
|
50 | var reflink = $(this); | |
|
51 | var pNum = reflink.text().match(/\d+/); | |
|
51 | 52 | |
|
52 | 53 | if (pNum == null || pNum.length == 0) { |
|
53 | 54 | return; |
@@ -57,8 +58,8 b' function showPostPreview(e) {' | |||
|
57 | 58 | if (post.length > 0 && isElementInViewport(post)) { |
|
58 | 59 | post.addClass('highlight'); |
|
59 | 60 | } else { |
|
60 | var x = e.clientX + (doc.documentElement.scrollLeft || doc.body.scrollLeft) + 2; | |
|
61 | var y = e.clientY + (doc.documentElement.scrollTop || doc.body.scrollTop); | |
|
61 | var x = reflink.offset().left; | |
|
62 | var y = reflink.offset().top; | |
|
62 | 63 | |
|
63 | 64 | var cln = doc.createElement('div'); |
|
64 | 65 | cln.id = 'pstprev_' + pNum; |
General Comments 0
You need to be logged in to leave comments.
Login now