|
OverviewThis guide will assist in upgrading from jQuery UI 1.8.5 to jQuery UI 1.8.6. See below for a list of all changes (API, markup, CSS classnames) between these two versions, organized by plugin. If you are upgrading from an older version to jQuery UI 1.8.6, see the 1.8 Upgrade Guide This release adds support for jQuery 1.4.3 and IE 9 beta. Core & UtilitiesWidget FactoryAdded ability to define new methods for gathering options on initialization Sometimes you want to allow users to specify options through a method other than passing an object during initialization. For example, you may want to allow users to specify options through data attributes, but still have any options passed during initialization take precedence. This is now possibly by defining a Here's an example from jQuery Mobile which will check for data attributes based on which options are defined in the widget's prototype:
_getCreateOptions: function() {
var elem = this.element,
options = {};
$.each( this.options, function( option ) {
var value = elem.data( option.replace( /[A-Z]/g, function( c ) {
return "-" + c.toLowerCase();
} ) );
if ( value !== undefined ) {
options[ option ] = value;
}
});
return options;
}
WidgetsWidgets no longer throw errors for invalid method calls In 1.8.5, widgets started throwing errors when calling a method that doesn't exist, or calling a method before a widget has been initialized. We have reverted back to the previous behavior of simply ignoring these calls because this was a breaking change that should not have been introduced in a minor release. However, we will go back to throwing errors in the next major release. AutocompleteAllow default behaviour on enter when menu is open but inactive. Previously when pressing enter while the menu was open, we would prevent the default action only if a menu item was active (highlighted). We now prevent the default action solely based on the visibility of the menu, so even if no menu item is active, we still prevent the default action. This prevents forms from submitting when the user is just trying to enter a value in the text field. Additionally, there was a bug in Opera where the form would be submitted even when we prevented the default action; this has been fixed. Split menu resizing logic into its own method The code for resizing the menu after each search has been moved out of the DatepickerAdded Galician localization Support for the Galician localization has been added for the Datepicker widget. Simply include the jquery.ui.datepicker-gl.js file after jquery.ui.datepicker.js and your date pickers will be localized. Added Portuguese localization Support for the Portuguese localization has been added for the Datepicker widget. Simply include the jquery.ui.datepicker-pt.js file after jquery.ui.datepicker.js and your date pickers will be localized. DialogDon't change DOM position on open Dialogs no longer get moved around in the DOM when they are opened. The only time the dialog is moved now is during initialization when it is appended to the body. This fixes a slew of problems, such as form elements being reset, iframes reloading, etc. ProgressbarAdded a complete callback Progressbar now has a
$( "#progressbar" ).progressbar({
complete: function() {
alert( "The action is complete!" );
}
});
$( ":ui-progressbar" ).live( "progressbarcomplete", function() {
alert( "Some action has completed." );
});
EffectsAllow borderColor to be animated You can now pass the borderColor shorthand property to
$( "#elem" ).animate({
borderColor: "red"
});
|