How to hide or show class
<script> if(window.location.pathname == "/my_url_site/site" || window.location.pathname == "/category/poduct") { document.getElementById("myButtonClass").style.visibility = "visible"; } </script>
in CSS it is defined in that way:
.myButtonClass{ background: blue; visibility: hidden; }
In html code you should declare:
<div class="myButtonClass"> text or something else.. </div>