Hi Tom,
I’ve given a section an id of “topBar” and when I click a button, that section will disappear. This is the JS code used:
<script type="text/javascript">
document.getElementById("closeTopBar").onclick = function(){
document.getElementById("topBar").style.display = none;
}
</script>
The code works fine. However, when a user moves to another page, the section will show up again and it’s annoying.
Question is: how to make it that when a user clicks the close button on any page, the section will not show up again on any page?
(the section is a global section inserted by hook)
GeneratePress 2.2.2
GP Premium 1.7.8