G’day everyone,
Is there a way to click multiple hidden buttons within different tabs when the page loads. Attributes’ Sort & Combine requires a button to be clicked for sorting to occur. I have multiple collection lists that need to be sorted, all on the same page, within different tabs. I have tried using the Attributes recommended code but it hasn’t seemed to work with multiple buttons on one page.
All help is greatly appreciated.
Thanks
Chas
https://preview.webflow.com/preview/6701community?utm_medium=preview_link&utm_source=designer&utm_content=6701community&preview=70339f52144319f3c8efe9cd7c16b128&pageId=64865a4f08bdcf60ad0ff61f&workflow=preview
set an id on each button that has to be clicked
then use this code in the body part of custom code of the page
$(document).ready(function() {
// Delay for 500 milliseconds (half a second)
setTimeout(function() {
// Simulate a click on the button with ID "myid"
$("#myid").click();
}, 500);
});
in
$(“#myid”).click();
change with real id… add new line for each ID
PS the script wait 500 ms before running so the finsweet sort must run first
have fun
I’m not sure if I did it correctly but it doesn’t seem to be working. I also need the buttons to be hidden.
you can set the button to display : none , javasxript don’t care about that… But you need a minimun understanding of code to do that…
1 Like