Execute tooltip listeners only once when the DOM is ready

This commit is contained in:
Franky Van Liedekerke
2020-05-03 21:12:29 +02:00
committed by GitHub
parent 0ede384cda
commit 17b764e862
4 changed files with 6 additions and 8 deletions

View File

@@ -3,6 +3,5 @@ document.addEventListener('DOMContentLoaded', function () {
KB.render();
KB.listen();
KB.keyboardShortcuts();
KB.tooltip();
KB.trigger('dom.ready');
});

View File

@@ -1,4 +1,4 @@
KB.tooltip = function () {
KB.on('dom.ready', function() {
function onMouseOver(mytarget) {
if (! exists()) {
create(mytarget);
@@ -113,4 +113,4 @@ KB.tooltip = function () {
mouseLeftParent();
}
});
};
});