Permalink
Browse files

jQuery.widget: Adding the only logical example I can think of for _in…

…it().
  • Loading branch information...
tjvantoll committed Oct 2, 2013
1 parent 9daa400 commit 5cff6e47ce3fe71e79b4a2377b730ea75ea6d32c
Showing with 11 additions and 1 deletion.
  1. +11 −1 entries/jQuery.widget.xml
View
@@ -240,6 +240,16 @@ _getCreateOptions: function() {
<p><em>Note: Initialization should only be handled if there is a logical action to perform on successive calls to the widget with no arguments.</em></p>
</desc>
+ <example>
+ <desc>Call the <code>open()</code> method if the <code>autoOpen</code> option is set.</desc>
+ <code><![CDATA[
+_init: function() {
+ if ( this.options.autoOpen ) {
+ this.open();
+ }
+}
+]]></code>
+ </example>
</method>
<method name="_setOptions">
<desc>
@@ -337,7 +347,7 @@ this._delay( this._foo, 100 );
<desc>The element(s) to apply the hoverable behavior to.</desc>
</argument>
<example>
- <desc>Apply the <code>ui-state-hover</code> class to all <code>&lt;div&gt;</code>s within the element on hover.</desc>
+ <desc>Apply hoverable styling to all <code>&lt;div&gt;</code>s within the element on hover.</desc>
<code><![CDATA[
this._hoverable( this.element.find( "div" ) );
]]></code>

0 comments on commit 5cff6e4

Please sign in to comment.