diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-03-19 00:11:55 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-03-19 00:11:55 +1100 |
| commit | 741e30e22fd05ebbb7eea969f919ea1573db815a (patch) | |
| tree | aad8fb257379164ac77f293b76acd11dd4bf98c1 /js | |
| parent | d38801fc4ed63e6caa4d4a39b88c1d250a09b6b9 (diff) | |
post-hover.js: Fixed bug on index pages
Diffstat (limited to 'js')
| -rw-r--r-- | js/post-hover.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/post-hover.js b/js/post-hover.js index c76ca0d8..7e085e97 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -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; @@ -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); + } } }); } |
