diff --git a/src/003-assets/CSS/tooltip.css b/src/003-assets/CSS/tooltip.css index 8246aae0c3bc3309c15ea13f4ecfe92aac2b447f..719d9e6bd315955439b5c7480bf150a143fec72a 100644 --- a/src/003-assets/CSS/tooltip.css +++ b/src/003-assets/CSS/tooltip.css @@ -58,13 +58,13 @@ z-index: 999; } -body.tooltipsEnabled .exampleTooltip:hover:after, body.tooltipsEnabled .devotion:hover:after, body.tooltipsEnabled .trust:hover:after, body.tooltipsEnabled .defiant:hover:after { +div.tooltipsEnabled .exampleTooltip:hover:after, div.tooltipsEnabled .devotion:hover:after, div.tooltipsEnabled .trust:hover:after, div.tooltipsEnabled .defiant:hover:after { visibility: visible; opacity: 1; bottom: 20px; } -body.tooltipsEnabled .exampleTooltip:hover:before, body.tooltipsEnabled .devotion:hover:before, body.tooltipsEnabled .trust:hover:before, body.tooltipsEnabled .defiant:hover:before { +div.tooltipsEnabled .exampleTooltip:hover:before, div.tooltipsEnabled .devotion:hover:before, div.tooltipsEnabled .trust:hover:before, div.tooltipsEnabled .defiant:hover:before { visibility: visible; opacity: 1; bottom: 15px; diff --git a/src/js/utilsDOM.js b/src/js/utilsDOM.js index 603a38fcb65d38cbc1c164eb3fc304555bc33661..9a1469dfc5bf94eda201d03c1bdd1219fef8cdd4 100644 --- a/src/js/utilsDOM.js +++ b/src/js/utilsDOM.js @@ -196,8 +196,8 @@ App.Utils.htmlToElement = function(text) { /* * Shows tooltips if they are enabled. Must be called on every passage load, because <body> gets reset. */ -$(document).on(":passageend", () => { +$(document).on(":passagestart", event => { if (V.tooltipsEnabled === 1) { - document.body.classList.add("tooltipsEnabled"); + event.content.classList.add("tooltipsEnabled"); } });