Skip to content

Element Instance References

Brandon Jordan edited this page Sep 3, 2023 · 3 revisions

You can easily reference an element by giving it a unique reference name (globally scoped) without needing to worry about its selector (which wouldn't give back the element instance).

Add a reference to any element:

Element()
    .ref("myReference")

Get it later using the ref() function.

ref("myReference"); // returns element instance.
Clone this wiki locally