<script> tag changing variables in my section.liquid files...

6 0 1

Hey all, 

Ive been staring at this issue for awhile and need some help. I am working on adding 2 different sliders using Glide.js, they are in different sections. They are shown or hidden based on a button click (using display). In each section I'm using a <script> tag to mount the `new Glide()` slider. When I preview the theme the JS in the console is different than the JS in the section files - no clue what is causing this. Screenshots/code below:

First section.liquid file:

Screen Shot 2021-07-08 at 2.25.47 PM.png

Second section.liquid file: 

Screen Shot 2021-07-08 at 2.26.38 PM.png


Then when I preview in the console I get this:


Screen Shot 2021-07-08 at 2.29.04 PM.pngScreen Shot 2021-07-08 at 2.29.18 PM.png


so its changing those var declarations to what seems to be the first one thats run...

Any ideas/help would be appreciated.

Happy to help with your Shopify theme issues! Help me out by accepting my solutions. Feel free to email me at: gary@emilystreetmarketing.com