Add class to element from Announcement banner

Hi,

I write code that add to element class name, but it’s not work from the banner,
Can you help me with this please,

I tried to attached the banner code and the html code that write in script field in JIRA,
but I can’t becouse I am new user,
How can I uploade files?

this is the code from the Announcement banner:
var popup = document.getElementById(“myPopup”);
popup.classList.toggle(“show”);

this is the code from the script field:
"

POP UP



Click me to toggle the popup!

  • A Simple Popup!*
"

Thanks,
Shani Levi