Link Search Menu Expand Document

button.callback

description

Will execute the command(s) whenever the button is clicked.

syntax

getButton(ELEMENT_NAME).callback(command)
  • command :

alternate(s)

  • getButton(ELEMENT_NAME).callback( command1, command2 )


example(s)


@newVideo("skate", "skate.mp4")
@    .print()
@,
@newButton("(Re)play")
$    .callback( 
$        getVideo("skate")
$           .stop()
$            .play()
$    )
@    .print()
  • Adds onto the page a video and a button which, whenever clicked, starts or restarts playing the video from the beginning.