Hi I think this is very easy but I just can't seem to twig it at the moment. I want to use a javascript function to set the visibility of an html tag. I realise the below is wrong as hidden doesn't take a boolean. I'm just struggling to click what the easiest way to do it is ?
So I have some script like this
<script>
function evaluateBoolean() {
if (location.hostname.indexOf("someval" > 0) {
return true;
} else {
return false;
}
</script>
and I wanted to use iut something like this
<div hidden="evaluateBoolean()"> this will be shown or displayed depending on the javascript boolean </div>