Shopify themes, liquid, logos, and UX
Hi there,
I am using on my website a JS to switch DIVs with buttons, it works great, however on one page I want to do it twice, and unfortunately after doing the exact same code, only one works now. Is there any way I can get both to work together, maybe creating like a class? Using defer/async?
Not an expert on JS by any means, so may be a silly question.
Worth noting that the 'indepth-grid' class in the code it's for one of the snippets, the other have completely different classes and it's noted on the <script>
Thanks!
<script>
function show(param_div_id) {
document.getElementById('indepth-grid').innerHTML = document.getElementById(param_div_id).innerHTML;
}
</script>
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025