Add delay customization to tooltip.js
This MR allows the delay of tooltips instantiated using tooltip.js to be customized through localStorage.
This commit is contained in:
parent
ebcf92c585
commit
9c55031ff7
1 changed files with 4 additions and 0 deletions
|
@ -3,8 +3,12 @@ import '~/commons/bootstrap';
|
|||
|
||||
export default {
|
||||
bind(el) {
|
||||
const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
|
||||
const delay = glTooltipDelay ? JSON.parse(glTooltipDelay) : 0;
|
||||
|
||||
$(el).tooltip({
|
||||
trigger: 'hover',
|
||||
delay,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue