kytschBASIC

Put down that phone!
Please view me on real computer.

MOUSEEVENT
ELEMENT, DOUBLE CLICK (optional)

This will allow you to listen for a mouse click or a mouse double click.

Note: to enable double click set the argument to true.

Example

AFUNCTION "popup", "message"

	alert(message);

END AFUNCTION

MOUSEEVENT "#btn-mouse-event"

    GOTO popup("Click by ID")

MOUSEEVENT ".btn-mouse-event"

    GOTO popup("Click by CLASS")

MOUSEEVENT "button p"

    GOTO popup("Click by TAG")

END MOUSEEVENT

BUTTON "btn-mouse-event"

	PRINT "Click to see popup by ID"

END BUTTON

BUTTON ,"btn-mouse-event"

	PRINT "Click to see popup by CLASS"

END BUTTON

BUTTON

	PRINT "Click to see popup by TAG"

END BUTTON

Output

Information on the ELEMENT argument

ELEMENT can be an ID, a CLASS, or a TAG.
Below is how to access the element by their different identifiers.

ID #element-id
CLASS .element-class
TAG button

See also