Search.../

target

Gets the element that the event was fired on.

Type:

ElementRead Only
Mixed in from:$w.Event

Was this helpful?

Get the ID of the target element

Code Example

Copy Code
1$w("#myElement").onEvent( (event) => {
2 let targetId = event.target.id; // "myElement"
3} );