I was wondering if you guys could help me with I think is a relativ simple task.
I would like to set up a custom code button, where when clicked, a function will wait 2 seconds before redirecting to a specific url.
I inspired myself from the w3school.com setTimeout function example but I donāt know how to replace the alarm function with a specific url like www.example.comā¦ for example
I wanted to ask you, would it be possible, in addition to redirecting to a specific page, also trigger a specific button (on that specific page) to ātrigger itselfā after the setTimeout function ?
Here is my issue:
I build a layout with the isotope plugin system (masonry layout style). Everything works more or less fine except the button that shows every items (data-filter=*) needs to be pressed so that the grid arranges itself correctely. That specific button has an id=āallā.
I was thinking of something like this (please donāt laugh)
when (window with new location).ready
(do a click function) {
button with id="all" is triggered
}
Hi @anthonysalamin , I think your best bet here would be to use a function directly from isotope. Iām sure they provide a JS method that lets you capture the same functionality as a button press.
So you could do something like āOn page load ā do this functionā, and the function there would be the same behavior as clicking that button.
Have you looked into the isotope docs to see if they provide this?
Hi there @justin_c, thank you for getting back !
Yes I search around and found some easy isotope initialisation tip on stackoverflow to filter directely a spcecific set of items which would look like this:
The problem is:
I took a snipet of isotope code that contains an already coded initialization of isotope that looks different than the simple syntax above becausethe snipet contains code that offers people a search option. The initialization code I have looks like this and donāt know where and how I should write my āfilter functionā:
Now I know this isnāt Webflow scope of support nor it is the one of isotopeā¦ just asking around if someone has an idea that could help me figure things out