_super Not Working the Way I Expect
I have created a few jQuery UI Widgets. I noticed that when I try to change an option after the widget is created, it is not working correctly.
Here is what my _setOption syntax looks like:
- _setOption: function (key, value) {
- this._super('_setOption', key, value );
- }
Of course, I do use a switch statement to run any special code as needed depending on what option is being changed.
Here is my syntax to change an option:
- $('.ui-mywidget').cform('option', 'myOption', 'newValue');
Instead of changing 'myOption' it just adds an option called '_setOption' and the value is 'myOption'. If I change the super call to this._super(key, value) it changes the option as expected. What am I doing wrong here?
I am using jQuery 1.9.1. It also happens with 1.9.2.