summaryrefslogtreecommitdiff
path: root/js/post-hover.js
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-03-16 09:29:58 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-03-16 09:29:58 +1100
commita5739602296251b698aab834205829ac37edca1b (patch)
treea6d287f1cf12a8e3ac1f28c39d92cc8ab9ed85a2 /js/post-hover.js
parentf48d338ce051070a0eb096ab5cac073f19467549 (diff)
show actual posts instead of highlighting them
Diffstat (limited to 'js/post-hover.js')
-rw-r--r--js/post-hover.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/js/post-hover.js b/js/post-hover.js
index d151e5b3..06dd55a2 100644
--- a/js/post-hover.js
+++ b/js/post-hover.js
@@ -20,10 +20,22 @@ $(document).ready(function(){
}
var post = $('div.post#reply_' + id);
- $(this).hover(function() {
- post.attr('style', 'border-style: none dashed dashed none; background: ' + post.css('border-right-color'));
+ $(this).hover(function(e) {
+ post.clone()
+ .attr('id', 'post-hover-' + id)
+ .addClass('post-hover')
+ .css('position', 'absolute')
+ .css('left', e.pageX + 15)
+ .css('top', e.pageY - post.height() - 15)
+ .css('border-style', 'solid')
+ .css('box-shadow', '1px 1px 1px #999')
+ .insertAfter($(this).parent());
}, function() {
- post.attr('style', '');
+ $('.post-hover').remove();
+ }).mousemove(function(e) {
+ $('#post-hover-' + id)
+ .css('left', e.pageX + 15)
+ .css('top', e.pageY - post.height() - 15);
});
});
});