There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.Close
Processing...
This may take a few seconds.

click-on-previous

Syntax

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

selector set = Any valid CSS selector referencing multiple elements.

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.

click-on-previous