summaryrefslogtreecommitdiff
path: root/js/post-hover.js
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-03-17 07:54:08 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-03-17 07:54:08 +1100
commitce25db62ea6064069414d0f5b2bb53132a51c328 (patch)
tree12660915f0f4eedae9cd98c07c1880e0d55f549c /js/post-hover.js
parent134146e32cc873b6a8a74a4b2084ad9ae984f8e2 (diff)
css bug
Diffstat (limited to 'js/post-hover.js')
-rw-r--r--js/post-hover.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/post-hover.js b/js/post-hover.js
index 5e5f4bab..e8b0c9b0 100644
--- a/js/post-hover.js
+++ b/js/post-hover.js
@@ -27,6 +27,8 @@ $(document).ready(function(){
// post is in view
post.attr('style', 'border-style: none dashed dashed none; background: ' + post.css('border-right-color'));
} else {
+ var top = e.pageY - post.height() - 15;
+
post.clone()
.attr('id', 'post-hover-' + id)
.addClass('post-hover')
@@ -34,6 +36,8 @@ $(document).ready(function(){
.css('border-style', 'solid')
.css('box-shadow', '1px 1px 1px #999')
.css('display', 'block')
+ .css('left', e.pageX)
+ .css('top', top > $(window).scrollTop() ? top : $(window).scrollTop())
.insertAfter($(link).parent());
$(link).trigger('mousemove');
}
@@ -59,7 +63,7 @@ $(document).ready(function(){
.find('div.post#reply_' + id);
if(typeof window.enable_fa == 'function' && localStorage['forcedanon'])
enable_fa();
- start_hover(link, post);
+ start_hover(link);
}
});
}