Instead of using styles in post-hover, use the CSS classes instead. This prevents display bugs when some styles have different borders than others
This commit is contained in:
parent
99a2e1cf3d
commit
5906af7dcd
@ -54,7 +54,7 @@ onready(function(){
|
|||||||
$post.offset().top + $post.height() >= $(window).scrollTop() &&
|
$post.offset().top + $post.height() >= $(window).scrollTop() &&
|
||||||
$post.offset().top <= $(window).scrollTop() + $(window).height()) {
|
$post.offset().top <= $(window).scrollTop() + $(window).height()) {
|
||||||
// post is in view
|
// post is in view
|
||||||
$post.attr('style', 'border-style: none dashed dashed none; background: ' + $post.css('border-right-color'));
|
$post.addClass('highlighted');
|
||||||
} else {
|
} else {
|
||||||
var $newPost = $post.clone();
|
var $newPost = $post.clone();
|
||||||
$newPost.find('>.reply, >br').remove();
|
$newPost.find('>.reply, >br').remove();
|
||||||
@ -122,7 +122,7 @@ onready(function(){
|
|||||||
if(!$post)
|
if(!$post)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$post.attr('style', '');
|
$post.removeClass('highlighted');
|
||||||
if($post.hasClass('hidden') || $post.data('cached') == 'yes')
|
if($post.hasClass('hidden') || $post.data('cached') == 'yes')
|
||||||
$post.css('display', 'none');
|
$post.css('display', 'none');
|
||||||
$('.post-hover').remove();
|
$('.post-hover').remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user