mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 05:26:19 +00:00
Don't search for the element by ID when we already have it
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -36,7 +36,7 @@ var customTooltips = function(tooltip) {
|
||||
tooltipEl = document.createElement("div");
|
||||
tooltipEl.id = "chartjs-tooltip";
|
||||
document.body.appendChild(tooltipEl);
|
||||
$("#chartjs-tooltip").html("<table></table>");
|
||||
$(tooltipEl).html("<table></table>");
|
||||
}
|
||||
// Hide if no tooltip
|
||||
if (tooltip.opacity === 0) {
|
||||
@@ -81,7 +81,7 @@ var customTooltips = function(tooltip) {
|
||||
innerHtml += "<tr><td>No activity recorded</td></tr>";
|
||||
}
|
||||
innerHtml += "</tbody></table>";
|
||||
$("#chartjs-tooltip").html(innerHtml);
|
||||
$(tooltipEl).html(innerHtml);
|
||||
}
|
||||
|
||||
// Display, position, and set styles for font
|
||||
|
||||
Reference in New Issue
Block a user