- Do not use
offsetoption in position properties, e.g. code$element.position({my: 'center center', at: 'center center', offset: '5 -10'})should be replaced with$element.position({my: 'center center', at: 'center+5 center-10'}). - Do not use
$element.bind(),$element.live(),$element.delegate()to assign event handler, use$element.on(). - Do not use browser sniffing with
$.browser, try to use feature detection instead ($.support). - Do not use
deferred.isRejected(),deferred.isResolved(), usedeferred.state()instead. Do not usedeferred.pipe(), thedeferred.then()method should be used instead. - Do not use the
$elements.size()method, use the$elements.lengthproperty instead. The.size()method is functionally equivalent to the.lengthproperty; however, the.lengthproperty is preferred because it does not have the overhead of a function call. - Checkbox/radio state in a
.trigger()ed “click” event now has the same state as in a user-initiated action. - Changed naming convention for
.data()keys, e.g.,ui-dialoginstead ofdialog. (http://jqueryui.com/upgrade-guide/1.9/#changed-naming-convention-for-data-keys). - Do not use
$.ui.contains(), use$.contains()instead. - Each widget instance already has unique identifier
this.uuidand event namespacethis.eventNamespace = "." + this.widgetName + this.uuid. Do not generate similar things manually. - Do not use
$element.focus(n)– it is deprecated. UsesetTimeout(function() { $element.focus(); }, n);. - Do not use
$element.zIndex()– it is deprecated. - Do not use
$.ui.keyCode.NUMPAD_*constants – they are removed. - Do not use
$element.data('someWidget')to retrieve widget instance. Useinstance()method:$element.someWidget('instance'). Unlike other plugin methods, theinstance()method is safe to call on any element. If the element is not an instance of the given widget, the method returnsundefined:$('<div></div>').dialog('instance') /* returns undefined instead of throwing Error */.
Original upgrade guides and full list of changes:
- jQuery Core 1.9 Upgrade Guide
- jQuery UI 1.9 Upgrade Guide
- jQuery UI 1.10 Upgrade Guide
- jQuery UI 1.11 Upgrade Guide
- jQuery UI 1.12 Upgrade Guide