I've used similar code to display an indeterminate progress bar on my button but now that I'm trying to just make the preloading bars appear, but they should not be visible before click. I want to trigger the animation on the button click to open the gallery or hide the loading animation until the click occurs.
The gallery can take 2-10 seconds to load so this button animation plays until the new page loads.
I think it may be the names of the elements as I've put several pieces of code together (originally ladda based preloader examples) and the bars are new. And the data loading I expect to hide the bars before click isn't working.
Thanks for any advice or recommendations!
.button[data-loading]
Codepen: https://codepen.io/admecoach/pen/NQwrOg
Objective is to have the large button clicked and then the bars animation begin playing to the right of the text until the new page loads. And all resets (no color progress bars visible) in appx 10 seconds in case the page doesn't load and the button needs to be clicked again.
