summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-09-19 00:02:59 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-09-19 00:02:59 +0000
commit5906af7dcd6ef1e824c14f51215cc55483e587c2 (patch)
treec09da25fa896f1e73c41b90f0e7a38ff0eb5f52c
parent99a2e1cf3ddf3e7b3be8f65029297dce6955509c (diff)
Instead of using styles in post-hover, use the CSS classes instead. This prevents display bugs when some styles have different borders than others
-rw-r--r--js/post-hover.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/post-hover.js b/js/post-hover.js
index 10542f20..23fda26c 100644
--- a/js/post-hover.js
+++ b/js/post-hover.js
@@ -54,7 +54,7 @@ onready(function(){
$post.offset().top + $post.height() >= $(window).scrollTop() &&
$post.offset().top <= $(window).scrollTop() + $(window).height()) {
// post is in view
- $post.attr('style', 'border-style: none dashed dashed none; background: ' + $post.css('border-right-color'));
+ $post.addClass('highlighted');
} else {
var $newPost = $post.clone();
$newPost.find('>.reply, >br').remove();
@@ -122,7 +122,7 @@ onready(function(){
if(!$post)
return;
- $post.attr('style', '');
+ $post.removeClass('highlighted');
if($post.hasClass('hidden') || $post.data('cached') == 'yes')
$post.css('display', 'none');
$('.post-hover').remove();