Skip to content

Commit

Permalink
Update tooltip attributes in single attr call
Browse files Browse the repository at this point in the history
  • Loading branch information
anvit committed May 16, 2024
1 parent 09398c6 commit 3834ce8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/arDominionB5Plugin/js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ import Tooltip from "bootstrap/js/dist/tooltip";
$("body.edit.show-edit-tooltips [id$=-help]").each((_, el) => {
$(el)
.prevAll(":not([type=hidden]):first")
.attr({ "data-bs-toggle": "tooltip", title: el.textContent.trim() })
.attr({ "data-bs-trigger": "focus" })
.attr({ "data-bs-placement": "left" });
.attr({
title: el.textContent.trim(),
"data-bs-toggle": "tooltip",
"data-bs-trigger": "focus",
"data-bs-placement": "left",
});
});

$("[data-bs-toggle=tooltip]").each((_, el) => new Tooltip(el));
Expand Down

0 comments on commit 3834ce8

Please sign in to comment.