-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
document.addEventListener("DOMContentLoaded", function () { | ||
const clinicLocationLabel = document.querySelector( | ||
"label[for='ctl01_TemplateBody_WebPartManager1_gwpciCreateNewAccountForm_ciCreateNewAccountForm_FB_DropDown_CsContact_Chapter']" | ||
); | ||
|
||
if (clinicLocationLabel) { | ||
// If using jQuery UI for tooltips, set the title attribute | ||
clinicLocationLabel.setAttribute( | ||
"title", | ||
"Select the county of your primary clinic, residency/fellowship, or study." | ||
); | ||
clinicLocationLabel.style.cursor = "help"; // Change cursor to indicate tooltip | ||
|
||
if (clinicLocationLabel) { | ||
// Add CSS classes for dotted underline and tooltip styling | ||
clinicLocationLabel.classList.add("tooltip-container"); | ||
} | ||
|
||
// If jQuery is available, initialize the tooltip | ||
if (window.jQuery) { | ||
$(clinicLocationLabel).tooltip({ | ||
position: { my: "left+15 center", at: "right center" }, | ||
tooltipClass: "custom-tooltip", | ||
}); | ||
} else { | ||
// If jQuery UI is not available, add a custom tooltip element | ||
clinicLocationLabel.classList.add("tooltip-container"); | ||
clinicLocationLabel.insertAdjacentHTML( | ||
"beforeend", | ||
"<span class='tooltiptext'>List the county of your primary clinic, residency/fellowship, or study.</span>" | ||
); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters