I have a project detail menu that I want to be open by default, iam new to coding but the only way to change this is by coding I think. I think I found some relevant code that needs to be changed:
php:
<a href="#" id="toggle-project-info" class="btn-lg project-toggle w-100 d-lg-flex justify-content-end">
<span class="more-info-text"> <?php _e('Meer projecten'); ?></span>
<i class="ml-3 fal fa-angle-up fa-2x text-white"></i>
</a>
js:
if (projectDetailToggle.on('click', function (e) {
e.preventDefault();
body.toggleClass('project-detail-open');
})
);
more js:
var projectDetailToggle = $('#toggle-project-info');
more php:
<script>
(() => {
const button = document.querySelector('#toggle-project-info');
if (!button) {
return;
}
window.addEventListener('load', () => button.click());
})();
</script>
I hope this is enough information, when the menu is open by default there still needs to be a option to close it.
If there is missing information please ask!