Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, I'm customizing Shopify's filters and I want to add a slider selector to the price filter.
I was able to get the slider and update the values properly.
I want to refresh the products list when selecting a value, like when the text fields are updated normally. But I can't get to trigger the same event than the input[type=text].
Is there a way to refresh the list with the selected values without using the default "Search" button?
Hi @jerome-sj
Depending on your theme, you should be able to use Javascript and call the default function to refresh the page. You can use input range instead.
Yes, I'm able to refresh. But the deault behavior is that when you updaet the value in the textbox, the list is refreshed, but not the page, so the filter's box stays open. The page only refreshes when we click on "Search".
I'd like to have the same behavior.
I tried to trigger a change or keypress or keydown event on the text field but nothing is fired then.
I cannot figure what event is actually called.
You need to find the original Javascript function on your theme to refresh the page without loading. Add that to your event listener for your input
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024