Skip to main content Link Menu Expand (external link) Document Search Copy Copied

selector.callback

description

Will execute the command on the element upon next selection, or the function whenever selection happens.

syntax

getSelector(ELEMENT_NAME).callback(element)
  • element :

alternate(s)

  • getSelector(ELEMENT_NAME).callback( function )


example(s)


@newImage("square", "square.png")
@,
@newImage("triangle", "triangle.png")
@    .before( getImage("square") )
@    .print()
@,
@newSelector("shapes")
@    .add( getImage("square") , getImage("triangle") )
$    .callback( getSelector("shapes").shuffle() )
@    .wait()
  • Adds two images side by side. The positions of the images are shuffled anytime either image is clicked.