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>
User | RANK |
---|---|
212 | |
151 | |
69 | |
46 | |
40 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023