What I'm trying to do is display a list of JIRA items in a Confluence page, and upon rollover get the description field for the JIRA item using the JIRA REST API, and load that text into a DIV on the same wiki. I almost have it working, but ran into one final hurdle.
What's working/not working:
The problem is that the hover code doesn't seem to even see the rollover in the rendered JQL Filter. Below is the JQuery code that I'm using to get the hover action when a link is embedded in a Confluence page (which works), but the alert (when uncommented) isn't triggered at all when rolling over any of the links in the rendered JQL Filter. How could I capture those events?
AJS.toInit(function() { AJS.$("a").hover(function() { //alert ("Rollover!"); if (this.href.includes("https://fakecompanyurl.com/browse/NGC")) { var IncomingURL = this.href; var JiraRef = IncomingURL.match(/NGC-\d+/); var ShortJiraRef = JiraRef.toString(); ShortJiraRef = ShortJiraRef.substr(4); var result = LookupJiraInfo(ShortJiraRef); // function defined elsewhere document.getElementById("definition").innerHTML = result; } else { document.getElementById("definition").innerHTML = "No associated JIRA description for this URL"; } }); }); </script>