]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Avatar menus use live() so they'll work with content inserted into the dom.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 19 Feb 2011 16:56:08 +0000 (16:56 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 19 Feb 2011 16:56:08 +0000 (16:56 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8333 36083f99-b078-4883-b0ff-0f9b5a30f544

js/lib/ui.js

index 3448d6b3501a51b7e9c9e775764f390c425937a2..f61e2faea546333e8cee8e599de4baa1a0ba2224 100644 (file)
@@ -101,16 +101,16 @@ elgg.ui.initHoverMenu = function(parent) {
        }
 
        // avatar image menu link
-       $(parent).find(".elgg-avatar").mouseover(function() {
+       $(parent).find(".elgg-avatar").live('mouseover', function() {
                $(this).children(".elgg-icon-hover-menu").show();
        })
-       .mouseout(function() {
+       .live('mouseout', function() {
                $(this).children(".elgg-icon-hover-menu").hide();
        });
 
 
        // avatar contextual menu
-       $(".elgg-avatar > .elgg-icon-hover-menu").click(function(e) {
+       $(".elgg-avatar > .elgg-icon-hover-menu").live('click', function(e) {
 
                var $hovermenu = $(this).parent().find(".elgg-menu-hover");