From: David ‘Bombe’ Roden Date: Sat, 23 Jul 2011 12:30:23 +0000 (+0200) Subject: Fade out all previous context menus when fading in a new one. X-Git-Tag: 0.6.6^2~6 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=74af78bee7dda61c9244b71e170c753bc15f80e4;p=Sone.git Fade out all previous context menus when fading in a new one. This resolves #221. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index b5a7a2a..29c5420 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -858,6 +858,7 @@ function ajaxifyPost(postElement) { /* show Sone menu when hovering over the avatar. */ $(postElement).find(".post-avatar").mouseover(function() { + $(".sone-menu:visible").fadeOut(); $(".sone-post-menu", postElement).mouseleave(function() { $(this).fadeOut(); }).fadeIn(); @@ -987,6 +988,7 @@ function ajaxifyReply(replyElement) { /* show Sone menu when hovering over the avatar. */ $(replyElement).find(".reply-avatar").mouseover(function() { + $(".sone-menu:visible").fadeOut(); $(".sone-reply-menu", replyElement).mouseleave(function() { $(this).fadeOut(); }).fadeIn();