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
This needs a bit more clarity – if I understand you correctly you want to make sure that the current active page (ex. foo.html vs. bar.html) has the .active-trail
class applied.
In order to do that you need some way to determine the current page and that’s going to depend largely on your environment (WordPress, static HTML, etc, etc).
To use WordPress as an example; if this is your main navigation you could add a function to your theme to apply the aforementioned class as outlined in the following question on StackOverflow:
The answer in the above link also outlines a CSS-only option which may appeal to you, as WordPress should (by default) already apply a special class to the current page.