JIRA.ViewIssueTabs.onTabReady(function () { console.log("Questions Tab JS loaded!");});
Above event is getting called for all tabs.
Is there any way to detect (event) issue screen tab change event using JavaScript?
Hi @nija_kanthan
I don't understand.
The code you sent is in JavaScript,
JIRA.ViewIssueTabs.onTabReady
Is the event, the function inside doing what ever you want when the event occur, which means you detect it, catch and do what you want there...
So i don't understand your question.
I have custom tab called Questions. I want an event to detect tab change. If the selected tab is Questions i want to call some JavaScript function. Above method is getting called for all tabs.
OK,
You still have to call
But inside do what you want only if you are in tab Questions.
JIRA.ViewIssueTabs.onTabReady(function () { if ($("#issue-tabs").find(".active strong").text() == "Questions") { write your code here }});
It works,
if($("#issue-tabs").find('.active a').text() == 'Questions') { //code goes here}
I changed the condition into this.
Thanks for the reply
It looks like you're new here. Sign in or register to get started.