Skip to content

Commit

Permalink
post-hover.js: Fixed bug on index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Save committed Mar 18, 2012
1 parent d38801f commit 741e30e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/post-hover.js
Expand Up @@ -53,8 +53,7 @@ $(document).ready(function(){
if(post.length > 0) {
start_hover(this);
} else {
var link = this;
var url = $(link).attr('href').replace(/#.*$/, '');
var url = link.attr('href').replace(/#.*$/, '');

if($.inArray(url, dont_fetch_again) != -1) {
return;
Expand All @@ -66,13 +65,15 @@ $(document).ready(function(){
context: document.body,
success: function(data) {
$(data).find('div.post.reply').each(function() {
if($('#' + $(link).attr('id')).length == 0)
$('div.post:first').prepend($(link).css('display', 'none').addClass('hidden'));
if($('#' + $(this).attr('id')).length == 0)
$('div.post:first').prepend($(this).css('display', 'none').addClass('hidden'));

});

post = $('div.post#reply_' + id);
if(hovering && post.length > 0)
if(hovering && post.length > 0) {
start_hover(link);
}
}
});
}
Expand Down

0 comments on commit 741e30e

Please sign in to comment.