There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.

This may take a few seconds.



click-on-previous: (selector set) [starting-from(selector)] [every (time)] [after (time)][, (element)...];

selector set = Any valid CSS selector referencing multiple elements.

starting-from(selector) = Optional - any valid CSS selector referencing a single element in the selector set to start from. Ie. you want to click on the element before this starting point. If this option is not used, the currently focused element will be the starting point.

Sometimes focus-on-previous isn't enough. Sometimes you also need to trigger the Active CSS click event that would have happened if the user clicked on the previous element. It's a slightly niche scenario.

Use this with the focus-on-previous command. There is a very specific order of commands that will produce the desired effect.

It needs to run like this:

1) Run the click-on-previous command. The Active CSS click event will first run on that element.

2) Run the focus-on-previous command. That element will then get the focus. You can use " after stack" here to ensure focus runs after the click action.

The commands need to run in that order otherwise it all goes weird.

You can, of course, use this command on its own if you have a use for it.