diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-11-09 15:21:31 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-11-09 17:23:51 +0400 |
commit | 496102ef679dfa495f70fd01e8b90b0471cfe559 (patch) | |
tree | 982e7788d5282b9a416540c0734c4f5e6b8297bb /js/server_variables.js | |
parent | 56335b909a231542081f26619247a380857a7f8a (diff) |
Delegate hover event
Diffstat (limited to 'js/server_variables.js')
-rw-r--r-- | js/server_variables.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/js/server_variables.js b/js/server_variables.js index 931b099c1c..0091c0d707 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -17,18 +17,17 @@ AJAX.registerOnload('server_variables.js', function() { $cancelLink = $('a.cancelLink'); /* Variable editing */ - $('#serverVariables .var-row').hover( - function() { + $('#serverVariables').delegate('.var-row', 'hover', function(event) { + if (event.type === 'mouseenter') { var $elm = $(this).find('.var-value'); // Only add edit element if the element is not being edited if ($elm.hasClass('editable') && ! $elm.hasClass('edit')) { $elm.prepend($editLink.clone().show()); } - }, - function() { + } else { $(this).find('a.editLink').remove(); } - ); + }); $('#filterText').keyup(function(e) { if ($(this).val().length == 0) { |