Cell tooltip in SlickGrid

Misha Moroshko picture Misha Moroshko · May 6, 2010 · Viewed 12.8k times · Source

Some cells in my SlickGrid table have myClass class.

I added a tooltip for them like this:

$(".myClass").hover(// Mouse enters
                    function(e) {...},
                    // Mouse leaves
                    function() {...});

It works fine, but if I scroll the table to the bottom, and then scroll it back to the top, the tooltip does not appear anymore.

Can someone suggest any workaround ?

Thanks !

Answer

Dmitry Grinberg picture Dmitry Grinberg · Nov 2, 2011
        grid.onMouseEnter.subscribe(function(e, args) {
            var cell = grid.getCellFromEvent(e)
            var row = cell.row
            var item = dataView.getItem(row);
            //do whatever
        });

        grid.onMouseLeave.subscribe(function(e, args) {
            //do whatever
        });

cell, row and item are just examples for how to get to data