summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/js/util.js b/js/util.js
index 4f2b036fa..1b75c5e22 100644
--- a/js/util.js
+++ b/js/util.js
@@ -204,7 +204,6 @@ $(document).ready(function(){
$("#notices_primary .notices").prepend(document._importNode(li, true));
$("#notices_primary .notice:first").css({display:"none"});
$("#notices_primary .notice:first").fadeIn(2500);
- NoticeHover();
NoticeReply();
}
}
@@ -222,17 +221,16 @@ $(document).ready(function(){
NoticeReply();
});
+
function NoticeHover() {
- $("#content .notice").hover(
- function () {
- $(this).addClass('hover');
- },
- function () {
- $(this).removeClass('hover');
- }
- );
+ function mouseHandler(e) {
+ $(e.target).closest('li.hentry')[(e.type === 'mouseover') ? 'addClass' : 'removeClass']('hover');
+ };
+ $('#content .notices').mouseover(mouseHandler);
+ $('#content .notices').mouseout(mouseHandler);
}
+
function NoticeReply() {
if ($('#notice_data-text').length > 0) {
$('#content .notice').each(function() {