How to hide and show banner with JavaScript?

<script> var bannerId = 1; AJS.$('.jibrokBanner[bannerid=' + bannerId + ']').hide() //AJS.$('.jibrokBanner[bannerid=' + bannerId + ']').show() </script>