Personalized checkout and custom promotions with Shopify Scripts
Hey! I want to do a counter, which counts a number of typed letters in the input box (Kids name).
Link for this page: https://child-universe.com/collections/name-puzzle/products/hedgehog-board-name-puzzle
It's plugin input "Best Custom Products Option". I use javascript to do this function. When I tested it in Chrome Console, it worked perfectly. But when I tried to use it in theme code, it doesn't work. I think the reason is my code is not executing at the end of the page. (I placed my code at the end of theme.liquid file and console.log some text, after I saw what my code execute at the beginning).
So, i need to addEventListener for this input.
I do:
document.querySelector("MY INPUT").addEventListener("input", function(){
// script which count letters
});
After placing it in file, i got err in console.
How i can fix that, or make my code run at the end?
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024