Interactions
Draggable
Droppable
Resizable
Selectable
Sortable
Widgets
Accordion
Autocomplete
Button
Datepicker
Dialog
Progressbar
Slider
Tabs
Effects
Color Animation
Toggle Class
Add Class
Remove Class
Switch Class
Effect
Toggle
Hide
Show
Utilities
Position
About jQuery UI
Getting Started
Upgrade Guide
Changelog
Roadmap
Subversion Access
UI Developer Guidelines
Theming
Theming jQuery UI
jQuery UI CSS Framework
ThemeRoller application
Theme Switcher Widget

Contents

Overview

This 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 & Utilities

Widget Factory

Added 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 _getCreateOptions method.

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;
}

Widgets

Widgets 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.

Autocomplete

Allow 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 _suggest method and into a new _resizeMenu method. This provides a more logical method to override if you are trying to implement custom menu sizing.

Datepicker

Added 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.

Dialog

Don'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.

Progressbar

Added a complete callback

Progressbar now has a complete callback that is triggered when the value reaches 100. As with all callbacks, there is also an accompanying event.

$( "#progressbar" ).progressbar({
    complete: function() {
        alert( "The action is complete!" );
    }
});

$( ":ui-progressbar" ).live( "progressbarcomplete", function() {
    alert( "Some action has completed." );
});

Effects

Allow borderColor to be animated

You can now pass the borderColor shorthand property to .animate() in order to animate all borders with a single property.

$( "#elem" ).animate({
    borderColor: "red"
});