I am new to working with Javascript and adding it to MadCap. I have added javascript to hide content under certain conditions, however, the hidden content flashes whenever I switch to a page. I found this, but it only works in Chrome. Does anyone have another way to stop the flashing content in all browsers?
<script type="text/javascript">
var elm=document.getElementsByTagName("html")[0];
elm.style.display="none";
document.addEventListener("DOMContentLoaded",function(event) { elm.style.display="block"; });
</script>
Thank you