Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Announcement Banner unexpected behavior outside of system pages

Edited

I have the following

<script>
AJS.toInit(function(){
var $banner = AJS.$('#announcement-banner');
var $header = AJS.$('#header');

$header.before($banner);
});
</script>

 
This should place the announcement banner above the header.  However, it only seems to work on the system pages.  In the past, I think it worked on every page, so I don't know if there is some sort of plugin affecting this, or if it is a change in Jira itself. 

If I wrap the function in a timeout, then it will work.  I've tried waiting until the header element appears, but it seems to be something else loading that is making the header override this.  If I were to run this directly in the console then it would work to move the elements.

Jira Data Center 9.6.


1 answer

Found solution that works overall (it sometimes has a half second delay, so that would be nice to be rid of, but it will place the banner above the header):

<script type="module" defer>

AJS.toInit(function(){
var $banner = AJS.$('#announcement-banner');
var $header = AJS.$('#header');

$header.before($banner);
});
</script>

from: https://community.atlassian.com/t5/Jira-questions/Announcement-banner-script-not-working-after-Jira-upgrade-to-9-4/qaq-p/2231991

Suggest an answer

Log in or Sign up to answer