post-hover.js: Fixed bug on index pages
This commit is contained in:
parent
d38801fc4e
commit
741e30e22f
@ -53,8 +53,7 @@ $(document).ready(function(){
|
|||||||
if(post.length > 0) {
|
if(post.length > 0) {
|
||||||
start_hover(this);
|
start_hover(this);
|
||||||
} else {
|
} else {
|
||||||
var link = this;
|
var url = link.attr('href').replace(/#.*$/, '');
|
||||||
var url = $(link).attr('href').replace(/#.*$/, '');
|
|
||||||
|
|
||||||
if($.inArray(url, dont_fetch_again) != -1) {
|
if($.inArray(url, dont_fetch_again) != -1) {
|
||||||
return;
|
return;
|
||||||
@ -66,13 +65,15 @@ $(document).ready(function(){
|
|||||||
context: document.body,
|
context: document.body,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$(data).find('div.post.reply').each(function() {
|
$(data).find('div.post.reply').each(function() {
|
||||||
if($('#' + $(link).attr('id')).length == 0)
|
if($('#' + $(this).attr('id')).length == 0)
|
||||||
$('div.post:first').prepend($(link).css('display', 'none').addClass('hidden'));
|
$('div.post:first').prepend($(this).css('display', 'none').addClass('hidden'));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
post = $('div.post#reply_' + id);
|
post = $('div.post#reply_' + id);
|
||||||
if(hovering && post.length > 0)
|
if(hovering && post.length > 0) {
|
||||||
start_hover(link);
|
start_hover(link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user