object505 / tipso

A Lightweight Responsive jQuery Tooltip Plugin
http://tipso.object505.com/
MIT License
319 stars 119 forks source link

Added options to control show events and hide events #60

Open gazchap opened 7 years ago

gazchap commented 7 years ago

Have added a "showEvents" option and a "hideEvents" option, which default to 'mouseover' and 'mouseout' respectively.

The options can be a space-separated string of events, or an array of events, that trigger the tooltip to be shown or hidden.

Useful if you want a tooltip to show on an input element when the cursor is focused on it (e.g. on tablet devices where mouseover isn't traditionally possible.)

Example:

$('.tipso').tipso({ showEvents: 'mouseover focus', hideEvents: 'mouseout blur' });