We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9b092f commit 96ccdbdCopy full SHA for 96ccdbd
entries/jQuery.widget.xml
@@ -290,6 +290,20 @@ _setOptions: function( options ) {
290
<argument name="value" type="Object">
291
<desc>A value to set for the option.</desc>
292
</argument>
293
+ <example>
294
+ <desc>Update a widget's element when its <code>height</code> or <code>width</code> option changes.</desc>
295
+ <code><![CDATA[
296
+_setOption: function( key, value ) {
297
+ if ( key == "width" ) {
298
+ this.element.width( value );
299
+ }
300
+ if ( key == "height" ) {
301
+ this.element.height( value );
302
303
+ this._super( key, value );
304
+}
305
+]]></code>
306
+ </example>
307
</method>
308
<method name="_on">
309
<desc>
0 commit comments