Introduction
The element on the page that is currently active is the element in focus. Only one element on the page can have focus at any given moment. Typically, an element exhibits a visual cue, such as a subtle outline, indicating that it is in focus. The element in focus receives keystroke events if the user causes any.
An element receives focus and loses focus (blurs) through user actions, such as clicking and tabbing, or programmatically, using the focus( ) and blur( ) functions.
About Mixins
Mixins provide functionality that other elements can inherit and use.
Mixins are not elements. You cannot add mixins to a page in the Editor like other $w
elements, and mixins are not meant to be used directly
in your code.
For example, you would not write code like this, because it is out of context:
javascript | Copy Code$w("#FocusMixin").blur();
Instead, you can code the following if myElement
is an element that
"mixes in" FocusMixin
.
javascript | Copy Code$w("#myElement").blur();
Was this helpful?