레퍼런스 mousePressed()

mousePressed()

Calls a function when the mouse is pressed over the element.

Calling myElement.mousePressed(false) disables the function.

Note: Some mobile browsers may also trigger this event when the element receives a quick tap.

예제

구문

mousePressed(fxn)

매개변수

fxn
Function|Boolean:

function to call when the mouse is pressed over the element. false disables the function.

Notice any errors or typos? Please let us know. Please feel free to edit src/core/p5.Element.js and open a pull request!

관련 레퍼런스