I have HTML+CSS page where have two buttons:
<!-- Tab links -->
<div class="text-center">
<button class="tablinks" onclick="openCity(event, 'top-reviews')" id="defaultOpen">Top reviews</button>
<button class="tablinks" onclick="openCity(event, 'most-recent')">Most recent</button>
</div>
I want "Top reviews" to be visible by default. So at the end of the page I put simple JavaScript
<script>
document.getElementById("defaultOpen").click();
</script>
which click the "Top reviews" button automatically.
Everything works well in my development environment. But when uploaded the code to the production server where CloudFlare is enabled. JavaScript click() function doesn't works.
I already wrote for the issue to CloudFlare support, but two days later is still don't have any response.
Do you have any ideas on how I can debug why this JavaScript doesn't work? Or how to make visible content of "Top reviews" via another way without need visitors to click on the button with a mouse?