|
5 | 5 | <longdesc>
|
6 | 6 | <p>You can create new widgets from scratch, using just the <code>$.Widget</code> object as base to inherit from, or you can explicitly inherit from existing jQuery UI or third-party widgets. Defining a widget with the same name as you inherit from even allows you to extend widgets in place.</p>
|
7 | 7 |
|
8 |
| - <p>More details at <a href="https://github.com/scottgonzalez/widget-factory-docs/">https://github.com/scottgonzalez/widget-factory-docs/</a></p> |
| 8 | + <p>For now, more details can be found at <a href="https://github.com/scottgonzalez/widget-factory-docs/">github.com/scottgonzalez/widget-factory-docs/</a></p> |
9 | 9 | </longdesc>
|
10 | 10 | <signature returns="jQuery">
|
11 | 11 | <desc>Initialize the widget.</desc>
|
|
77 | 77 | <argument name="key" type="String"></argument>
|
78 | 78 | <argument name="value" type="Object"></argument>
|
79 | 79 | </method>
|
80 |
| - <method name="_bind"> |
| 80 | + <method name="_on"> |
81 | 81 | <desc>
|
82 |
| - Binds events to the specified element. If no element is specified then this.element is used. |
83 |
| - <p><code>handlers</code> is a hash of event names and event handlers. Delegation is supported via selectors inside the event names, e.g., "<code>click .foo</code>".</p> |
| 82 | + Binds events to the specified element. If no element is specified then <code>this.element</code> is used. |
| 83 | + <p><code>handlers</code> is an object of event names and event handlers. Delegation is supported via selectors inside the event names, e.g., "<code>click .foo</code>".</p> |
84 | 84 | <p>Maintains proper <code>this</code> context inside the handlers.</p>
|
85 | 85 | <p>Automatically handles disabled widgets: If the widget is disabled or the event occurs on an element with the <code>ui-state-disabled</code> class, the event handler is not invoked.</p>
|
86 | 86 | <p>Event handlers are automatically namespaced and cleaned up on destroy. </p>
|
87 | 87 | </desc>
|
88 | 88 | <argument name="element" type="jQuery" optional="true"></argument>
|
89 | 89 | <argument name="handlers" type="Object"></argument>
|
90 | 90 | </method>
|
| 91 | + <method name="_off"> |
| 92 | + <desc> |
| 93 | + Unbinds events from the specified element (required, unlike <code>_on</code>). |
| 94 | + <p><code>eventName</code> is a string of one or more space-separated events to remove. The widget's event namespace is appended to each when removing events. </p> |
| 95 | + </desc> |
| 96 | + <argument name="element" type="jQuery"></argument> |
| 97 | + <argument name="eventName" type="String"></argument> |
| 98 | + </method> |
91 | 99 | <method name="_super">
|
92 | 100 | <desc>Invoke the method of the same name from the parent widget, with any specified arguments. Essentially <code>.call()</code>.</desc>
|
93 | 101 | </method>
|
|
0 commit comments