Search code examples
angularangular2-templatengx-bootstrap

Display ngx bootstrap tooltip when mouse entered or hovered and remove when either clicked on mouse removed from there


I dont fully understand the concept of what triggers exactly do for https://valor-software.com/ngx-bootstrap/#/tooltip#triggers-custom

For example, when we do:

triggers="mouseenter:click"

Does it mean that tooltip will be displayed when we hover/put the mouse there and disappear when clicked?

If so, is it possible to specify two events for which tooltip should disappear.

Example, I want to display the tooltip when I hover on it and then make it disappear either when I click on it or remove the mouse from there. Any ideas?


Solution

  • You can use an array of events, something like this might work: triggers="mouseenter mouseleave click"

    triggers => Specifies events that should trigger. Supports a space separated list of event names.