On hover task, icons visible and clickable

I’m using angular 2+ and jquery. I would like to know if it’s possible when mouse is hover a task to make appear icons at the right corner of the task. When one clicks on the icon for creation, it opens the window for task creation/edition, and when clicks on another icon it redirects to another page. Do you think it’s possible ? Maybe with tooltips function ?
Many thanks.

Yes, it is possible to do that. You just need to return buttons in the rightside text function:
docs.dhtmlx.com/gantt/api__gant … plate.html
The following snippet shows how it might be implemented:
Each button is “hidden” by opacity parameter, that is controlled by mouse hover(check “HTML” tab), and actions are applied in a separate function.

Have you also checked “quick info” extension? Maybe it has the functionality you need. Although, it works just by clicking on the task not by hovering on it. Here is the example with the quick info extension:

thank you very much for this ! When I’m trying to reproduce the first snippet but i get an “Uncaught ReferenceError: action is not defined
at HTMLInputElement.onclick”. :s

Unfortunately, I couldn’t reproduce it. I tried Firefox, Chrome, Edge and other not popular browsers and it works correctly. Do you use Internet Explorer or Edge or an old browser?
I recorded how it works in Google Chrome and Firefox:

You can record it and upload the video there:


probably it’s due to the way function action is declared and called.
The onclick handler in code expects it to be defined in the global scope:

<input class='side_button' type=button onclick=action(

while the function is defined using this expression

function action(id, type){ ... }

Which defines a function in the same scope where the code is called. It works as expected if all code is executed in the global scope, but if it’s placed inside another function, for example inside window ready or DOMContentLoaded event hanlder - action won’t be available from the global scope, explaining the error you have.

As a solution, you can change the declaration of the action function, please check this snippet:

Thanks both for helping! The last snippet is working like a charm ! Thanks for the explanation !