close button on announcement bar change cursor

Hello, I looked at a previous discussion board and I was able to download the code to create an “X” closing button for my announcement banner, but the “X” button keeps coming up as a text pointer and not a link pointer when I hover the cursor over the button. How do I fix the cursor in the code? Thank you.

document.querySelector(“#shopify-section-announcement-bar > div”).insertAdjacentHTML(‘beforeend’, ‘X’);
const closeX = document.querySelector(‘.closeX’);
closeX.style.position = ‘absolute’;
closeX.style.top = ‘8px’;
closeX.style.right = ‘10px’;
closeX.addEventListener(‘click’, function() {
document.querySelector(“#shopify-section-announcement-bar”).style.display = “none”
})

Hi @ALBAR25

If you add this to any style tag you have on the page it should work:

strong.closeX {
    cursor: pointer;
}

Could you try inserting this line of code above the addEventListener line to see if it is what you’re looking for?

closeX.style.cursor = ‘pointer’;