Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JQuery's action go to start when I reload the page Reply To: JQuery's action go to start when I reload the page

#256043
JeroenR
Participant

I guess I would make the click function a separate function which you can call from the click event as well as the document ready event.
The click event passes the right item by clicking on the item. Document ready passes the right item by searching for your active-trail class, or just get the first item.
The result would then be something like this: https://codepen.io/jeroenreijs/pen/rwzLwo