Add Sone context menu when hovering over avatar.
[Sone.git] / src / main / resources / static / javascript / sone.js
index d6c83ae..0e3df51 100644 (file)
@@ -802,6 +802,14 @@ function ajaxifyPost(postElement) {
 
        /* hide reply input field. */
        $(postElement).find(".create-reply").addClass("hidden");
+
+       /* show Sone menu when hovering over the avatar. */
+       $(postElement).find(".avatar").mouseover(function() {
+               $(".sone-post-menu", postElement).mouseleave(function() {
+                       $(this).fadeOut();
+               }).fadeIn();
+               return false;
+       });
 }
 
 /**