b70590d5e92105ccead50ec50dee18220d568def
kate
  Fri Apr 13 15:33:47 2012 -0700
1. Change handling of hovering over experiments to suppress highlighting on IE which is too slow.  Item *28 in redmine #5149.  2.  Change handling of title (tooltip) on experiments for less overhead (assign as attribute, instead of dynamically generating on click)
diff --git src/hg/js/encodeMatrix.js src/hg/js/encodeMatrix.js
index 98941c8..b168f7a 100644
--- src/hg/js/encodeMatrix.js
+++ src/hg/js/encodeMatrix.js
@@ -117,30 +117,47 @@
                 // Note: user-defined callback requires 
                 // default actions from floatHeader plugin
                 // implementation (stop+fadeIn)
                 header.stop(true, true);
                 header.fadeIn(100);
 
                 if (encodeMatrix.isFileSearch()) {
                     $('#searchFiles').attr('checked', true);
                 } else {
                     $('#searchTracks').attr('checked', true);
                 }
             }
         });
     },
 
+    hoverExperiment: function ($td) {
+        // Add highlight on hover of experiment table cell.
+        // NOTE: suppressed in IE due to performance issues
+        // NOTE: tied to class name in dataMatrix.css
+
+        if (!$.browser.msie) {
+            $td.hover(
+                function() {
+                    $(this).addClass("experimentHover");
+                },
+                function () {
+                    $(this).removeClass("experimentHover");
+                }
+            );
+        }
+    },
+
     hoverTableCrossHair: function ($table) {
         // Add Cross-hair effect (column and row hover) to table
         // thanks to Chris Coyier, css-tricks.com
         // NOTE:  acts on colgroups declared at start of table
         // NOTE: uses many hard-coded CSS classes, and adds 'crossHair' class (relies on styling)
 
         var $col;
         var tableId, tableSelector;
 
         // NOTE: too slow on IE, so skip 
         if ($.browser.msie) {
             return;
         }
         tableId = $table.attr('id');
         // add event handling to both main table and its clone