.click()

  • function
FuncUnit.prototype.click  

You can pass it any of the serializable parameters you'd send to

click(options [,success])

Clicks an element. This uses [syn.prototype.click] to issue a:

  • mousedown
  • focus - if the element is focusable
  • mouseup
  • click
If no clientX/Y or pageX/Y is provided as options, the click happens at the center of the element.

For a right click or double click use .rightClick() or .dblclick().

Example

//clicks the bar element
F("#bar").click()

Parameters

  1. options {Object}Optional

    options to pass to the click event. Typically, this is clientX/Y or pageX/Y:

    $('#foo').click({pageX: 200, pageY: 100});
    
  2. success {function()}Optional

    a callback that runs after the click, but before the next action.

Returns

{funcUnit}

returns the funcunit object for chaining.

initMouseEvent, but command keys are controlled by .type().