Search code examples
javascriptjquerytooltipslickgrid

SlickGrid, copy text from Tooltip using AutoTooltips plugin


I use objects as the data for my grid. These objects contain a text value as well as an arbitrary amount of issues. The text is displayed in the cell and the issue-messages are displayed as a tooltip via the AutoTooltips plugin for each cell. This works fine so far.

My problem: I want to copy text from the tooltip. However: the tooltip disappears as soon as the mouse leaves the cell and I can't figure out how to keep the tooltip 'active' long enough (e.g. as long as the mouse moves towards it) to enter the tooltip and copy text from it. Is there a way to achieve this using the AutoTooltips plugin?


Solution

  • The AutoTooltips plugin only adds the property title. You have to either change the code behind or add another library/scripts that generate tooltip and allows to copy text.

    Check http://jquerytools.github.io/demos/tooltip/index.html.

    To implement it, just add the code $(grid_container).tooltip() after the grid/rows are rendered.