Button auto click on pageload not working for finsweet cms sort

So my sort-by-date feature is working great. The script provided by finsweet to auto sort on page load “works” but only after the user presses the button once. My idea is when the page is first loaded the list sorts by date without the use having to press the button at all. How do I accomplish this?
UPDATE) Appears to work on phones just not my desktop ?


Here is my site Read-Only: [LINK]1
(how to share your site Read-Only link)

Is this the correct live page to see the working script?
It’s sorting on load on Chrome.

Because you’re doing this on page load, you see it load unsorted, and then sort. You might want to use Webflow’s collection list sorting as well so that the inital state is closer to your objective.


Webflow sorting would be ideal but this page gets exported as code and uploaded to Shopify which does not allow that kind of sorting which is why I have to use a script.