Form Reset Mixin
Description: A mixin to call refresh()
on an input widget when the parent form gets reset.
This only works for native input elements that have a form attribute, like an
<input>
. It doesn't work for other elements like <label>
or <div>
Methods
_bindFormResetHandler()Returns: jQuery (plugin only)
Call
this._bindFormResetHandler()
inside _create()
to initialize the mixin.
- This method does not accept any arguments.
Code examples:
Set the background color of the widget's element based on an option.
1
2
3
|
|
_unbindFormResetHandler()Returns: jQuery (plugin only)
Call
this._unbindFormResetHandler()
inside _destroy()
to destroy the mixin.
- This method does not accept any arguments.
Code examples:
1
2
3
|
|
Example:
Type colors into the input
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
|