jQuery 1.6.1 Released

Posted on by

We’re pleased to announce the first update to jQuery 1.6!

You can get the code from the jQuery CDN:

Additionally you can also load the URLs directly from Microsoft and Google’s CDNs:

Microsoft CDN: http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js
Google CDN: https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.6.1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

Upgrading From 1.5.2 to 1.6.1

With the introduction of the new .prop() method and the changes to the .attr() method, jQuery 1.6 sparked a discussion about the difference between attributes and properties and how they relate to each other. It also came with some backwards compatibility issues that have been fixed in 1.6.1. When updating from 1.5.2 to 1.6.1, you should not have to change any attribute code.

Below is a description of the changes to the Attributes module in jQuery 1.6 and 1.6.1, as well as the preferred usage of the .attr() method and the .prop() method. However, as previously stated, jQuery 1.6.1 will allow you to use .attr() just as it was used before in all situations.

Note that the changes described in the 1.6 release notes regarding the .data() method have been worked around and now work seamlessly between 1.5.2 and 1.6.1.

What’s Changed

The changes to the Attributes module removed the ambiguity between attributes and properties, but caused some confusion in the jQuery community, since all versions of jQuery prior to 1.6 have handled attributes and properties in one method(.attr()). The old .attr() method had many bugs and was hard to maintain.

jQuery 1.6.1 comes with several bug fixes as well as an update to the Attributes module.

Specifically, boolean attributes such as checked, selected, readonly, and disabled in 1.6.1 will be treated just as they used to be treated in jQuery versions prior to 1.6. This means that code such as

$(“:checkbox”).attr(“checked”, true);
$(“option”).attr(“selected”, true);
$(“input”).attr(“readonly”, true);
$(“input”).attr(“disabled”, true);

or even:

if ( $(“:checkbox”).attr(“checked”) ) { /* Do something */ }

will not need to be changed in 1.6.1 in order to work as previously expected.

To make the changes to .attr() in jQuery 1.6 clear, here are some examples of the use cases of .attr() that worked in previous versions of jQuery that should be switched to use .prop() instead:

.attr() Proper .prop() usage
$(window).attr… $(window).prop…
$(document).attr… $(document).prop…
$(“:checkbox”).attr(“checked”, true); $(“:checkbox”).prop(“checked”, true);
$(“option”).attr(“selected”, true); $(“option”).prop(“selected”, true);

First, using the .attr() method on the window or document did not work in jQuery 1.6 because the window and document cannot have attributes. They contain properties (such as location or readyState) that should be manipulated with .prop() or simply with raw javascript. In jQuery 1.6.1, the .attr() will defer to the .prop() method for both the window and document instead of throwing an error.

Next, checked, selected, and other boolean attributes previously mentioned are receiving special treatment because of the special relationship between these attributes and their corresponding properties. Basically, an attribute is what you see in the html:

<input type=”checkbox” checked=”checked”>

Boolean attributes such as checked only set the default or initial value. In the case of a checkbox, the checked attribute sets whether the checkbox should be checked when the page loads.

Properties are what the browser uses to keep track of the current values. Normally, properties reflect their corresponding attributes (if they exist). This is not the case with boolean attributes. Boolean properties stay up to date when the user clicks a checkbox or selects an option in a select element. The corresponding boolean attributes do not. As was stated above, they are used by the browser only to store the initial value.

$(“:checkbox”).get(0).checked = true;
// Is the same as $(":checkbox:first").prop(“checked”, true);

In jQuery 1.6, setting checked with

$(“:checkbox”).attr(“checked”, true);

would not check the checkbox because it was the property that needed to be set and all you were setting was the initial value.

However, once jQuery 1.6 was released, the jQuery team understood that it was not particularly useful to set something that the browser was only concerned with on page load. Therefore, in the interest of backwards compatibility and the usefulness of the .attr() method, we will continue to be able to get and set these boolean attributes with the .attr() method in jQuery 1.6.1.

The most common boolean attributes are checked, selected, disabled, and readOnly, but here is a full list of boolean attributes/properties that jQuery 1.6.1 supports dynamically getting and setting with .attr():

autofocus, autoplay, async, checked, controls, defer, disabled,
hidden, loop, multiple, open, readonly, required, scoped, selected

It is still recommended that .prop() be used when setting these boolean attributes/properties, but your code will continue working in jQuery 1.6.1 even if these use cases are not switched to use the .prop() method.

Below is a list of some attributes and properties and which method should normally be used when getting or setting them. This is the preferred usage, but the .attr() method will work in all attribute cases.

Note that some DOM Element properties are also listed below – but will only work with the new .prop() method.

Attribute/Property .attr() .prop()
accesskey
align
async
autofocus
checked
class
contenteditable
defaultValue
draggable
href
id
label
location *
multiple
nodeName
nodeType
readOnly
rel
selected
selectedIndex
src
style
tabindex
tagName
title
type
width **

* For example, with window.location
** If needed over .width()

Neither .attr() nor .prop() should be used for getting/setting value. Use the .val() method instead (although using .attr(“value”, “somevalue”) will continue to work, as it did before 1.6).

Summary of Preferred Usage

The .prop() method should be used for boolean attributes/properties and for properties which do not exist in html (such as window.location). All other attributes (ones you can see in the html) can and should continue to be manipulated with the .attr() method.

jQuery 1.6.1 Change Log

The current change log of the 1.6.1 release.

Attributes

  • #9071: $(‘<option></option>’).val(‘myValue’) no longer sets value
  • #9079: .attr(“selected”) returns non-useful value in 1.6
  • #9089: 1.6 atrr() Inconsistant in IE7,8
  • #9094: Issue with jQuery 1.6: Can’t uncheck checkboxes
  • #9103: .attr(‘foo’, true) not setting related DOM property
  • #9123: Strange behavior of attr method when generate input element.
  • #9129: jQuery does not support enumerated attributes such as contenteditable
  • #9191: attr checked bug on radio

Data

  • #9124: Changes to $.data illogical in certain case
  • #9126: jquery breaks on use strict

Deferred

  • #9104: Returning null or undefined in a pipe filter function causes an exception

Effects

  • #9074: Cannot animate position and opacity at same time
  • #9100: Order of hide() callbacks has changed

Event

  • #9069: when hover over a child of an element, mouseleave fires when using live or delegate

Manipulation

  • #9072: jQuery 1.6 Crashes IE 6
  • #9221: Javascript within AJAX fails to load in IE – Error 80020101

Queue

  • #9147: Variable tmp in promise implicitly declared?

Selector

  • #7341: Slow .add() in IE
  • #9096: Selector or find bug in jQuery 1.6
  • #9154: :reset pseudo-selector broken

Support

  • #8763: Unhandled exception: document.defaultView.getComputedStyle(div, null) is null (FF, hidden iframe)
  • #9109: support.boxModel now false in IE6 even when not in quirks mode

jQuery 1.6.1 RC 1 Released

Posted on by

We’re nearing the first update to jQuery 1.6 – and we’re pleased to announce the release of the first release candidate! Barring any major bugs this should be the code that we end up shipping for jQuery 1.6.1 (which will be happening this week).

You can get the code from the jQuery CDN:

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.6.1 RC 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

Upgrading From 1.5.2 to 1.6.1

With the introduction of the new .prop() method and the changes to the .attr() method, jQuery 1.6 sparked a discussion about the difference between attributes and properties and how they relate to each other. It also came with some backwards compatibility issues that have been fixed in 1.6.1. When updating from 1.5.2 to 1.6.1, you should not have to change any code.

Below is a description of the changes to the Attributes module in jQuery 1.6 and 1.6.1, as well as the preferred usage of the .attr() method and the .prop() method. However, as previously stated, jQuery 1.6.1 will allow you to use .attr() just as it was used before in all situations.

What’s Changed

The changes to the Attributes module removed the ambiguity between attributes and properties, but caused some confusion in the jQuery community, since all versions of jQuery prior to 1.6 have handled attributes and properties in one method(.attr()). The old .attr() method had many bugs and was hard to maintain.

jQuery 1.6.1 comes with several bug fixes as well as an update to the Attributes module.

Specifically, boolean attributes such as checked, selected, readonly, and disabled in 1.6.1 will be treated just as they used to be treated in jQuery versions prior to 1.6. This means that code such as

$(“:checkbox”).attr(“checked”, true);
$(“option”).attr(“selected”, true);
$(“input”).attr(“readonly”, true);
$(“input”).attr(“disabled”, true);

or even:

if ( $(“:checkbox”).attr(“checked”) ) { /* Do something */ }

will not need to be changed in 1.6.1 in order to work as previously expected.

To make the changes to .attr() in jQuery 1.6 clear, here are some examples of the use cases of .attr() that worked in previous versions of jQuery that should be switched to use .prop() instead:

.attr() Proper .prop() usage
$(window).attr… $(window).prop…
$(document).attr… $(document).prop…
$(“:checkbox”).attr(“checked”, true); $(“:checkbox”).prop(“checked”, true);
$(“option”).attr(“selected”, true); $(“option”).prop(“selected”, true);

First, using the .attr() method on the window or document did not work in jQuery 1.6 because the window and document cannot have attributes. They contain properties (such as location or readyState) that should be manipulated with .prop() or simply with raw javascript. In jQuery 1.6.1, the .attr() will defer to the .prop() method for both the window and document instead of throwing an error.

Next, checked, selected, and other boolean attributes previously mentioned are receiving special treatment because of the special relationship between these attributes and their corresponding properties. Basically, an attribute is what you see in the html:

<input type=”checkbox” checked=”checked”>

Boolean attributes such as checked only set the default or initial value. In the case of a checkbox, the checked attribute sets whether the checkbox should be checked when the page loads.

Properties are what the browser uses to keep track of the current values. Normally, properties reflect their corresponding attributes (if they exist). This is not the case with boolean attributes. Boolean properties stay up to date when the user clicks a checkbox or selects an option in a select element. The corresponding boolean attributes do not. As was stated above, they are used by the browser only to store the initial value.

$(“:checkbox”).get(0).checked = true;
// Is the same as $(":checkbox:first").prop(“checked”, true);

In jQuery 1.6, setting checked with

$(“:checkbox”).attr(“checked”, true);

would not check the checkbox because it was the property that needed to be set and all you were setting was the initial value.

However, once jQuery 1.6 was released, the jQuery team understood that it was not particularly useful to set something that the browser was only concerned with on page load. Therefore, in the interest of backwards compatibility and the usefulness of the .attr() method, we will continue to be able to get and set these boolean attributes with the .attr() method in jQuery 1.6.1.

The most common boolean attributes are checked, selected, disabled, and readOnly, but here is a full list of boolean attributes/properties that jQuery 1.6.1 supports dynamically getting and setting with .attr():

autofocus, autoplay, async, checked, controls, defer, disabled,
hidden, loop, multiple, open, readonly, required, scoped, selected

It is still recommended that .prop() be used when setting these boolean attributes/properties, but your code will continue working in jQuery 1.6.1 even if these use cases are not switched to use the .prop() method.

Below is a list of some attributes and properties and which method should normally be used when getting or setting them. This is the preferred usage, but the .attr() method will work in all cases.

Attribute/Property .attr() .prop()
accesskey
align
async
autofocus
checked
class
contenteditable
draggable
href
id
label
location ( i.e. window.location )
multiple
readOnly
rel
selected
src
tabindex
title
type
width ( if needed over .width() )

Neither .attr() nor .prop() should be used for getting/setting value. Use the .val() method instead (although using .attr(“value”, “somevalue”) will continue to work, as it did before 1.6).

Summary of Preferred Usage

The .prop() method should be used for boolean attributes/properties and for properties which do not exist in html (such as window.location). All other attributes (ones you can see in the html) can and should continue to be manipulated with the .attr() method.

jQuery 1.6.1 RC 1 Change Log

The current change log of the 1.6.1 RC 1 release.

Attributes

  • #9079: .attr(“selected”) returns non-useful value in 1.6
  • #9089: 1.6 atrr() Inconsistant in IE7,8
  • #9094: Issue with jQuery 1.6: Can’t uncheck checkboxes
  • #9103: .attr(‘foo’, true) not setting related DOM property
  • #9123: Strange behavior of attr method when generate input element.
  • #9129: jQuery does not support enumerated attributes such as contenteditable
  • #9191: attr checked bug on radio

Data

  • #9124: Changes to $.data illogical in certain case
  • #9126: jquery breaks on use strict

Deferred

  • #9104: Returning null or undefined in a pipe filter function causes an exception

Effects

  • #9074: Cannot animate position and opacity at same time
  • #9100: Order of hide() callbacks has changed

Event

  • #9069: when hover over a child of an element, mouseleave fires when using live or delegate

Manipulation

  • #9072: jQuery 1.6 Crashes IE 6

Queue

  • #9147: Variable tmp in promise implicitly declared?

Selector

  • #7341: Slow .add() in IE
  • #9096: Selector or find bug in jQuery 1.6
  • #9154: :reset pseudo-selector broken

Support

  • #8763: Unhandled exception: document.defaultView.getComputedStyle(div, null) is null (FF, hidden iframe)
  • #9109: support.boxModel now false in IE6 even when not in quirks mode

jQuery 1.6 Released

Posted on by

jQuery 1.6 is now live and available for consumption! We’re quite proud of this release, it includes a major rewrite of the Attribute module and a number of performance improvements.

Please take this opportunity to thank members of the jQuery Team and the jQuery bug triage team for their help in getting this release out the door.

You can get the code from the jQuery CDN:

You can also get the code from other CDNs as well:

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

In fact, we’re already getting started working on jQuery 1.7. We’re welcoming feature proposals for jQuery 1.7. If you have any suggestions please submit them using the aforementioned form.

jQuery 1.6 Change Log

All of the API changes that occurred in this release can be found in the jQuery API documentation:
http://api.jquery.com/category/version/1.6/

Breaking Changes

In most releases we try to main compatibility with existing code. However, there are a few cases where jQuery 1.6 may require changes to existing code:

Case-mapping of data- attributes

jQuery 1.5 introduced a feature in the .data() method to automatically import any data- attributes that were set on the element and convert them to JavaScript values using JSON semantics. In jQuery 1.6 we have updated this feature to match the W3C HTML5 spec with regards to camel-casing data attributes that have embedded dashes. So for example in jQuery 1.5.2, an attribute of data-max-value="15" would create a data object of { max-value: 15 } but as of jQuery 1.6 it sets { maxValue: 15 }.

.prop(), .removeProp(), and .attr()

In the 1.6 release we’ve split apart the handling of DOM attributes and DOM properties into separate methods. The new .prop() method sets or gets properties on DOM elements, and .removeProp() removes properties. In the past, jQuery has not drawn a clear line between properties and attributes. Generally, DOM attributes represent the state of DOM information as retrieved from the document, such as the value attribute in the markup <input type="text" value="abc">. DOM properties represent the dynamic state of the document; for example if the user clicks in the input element above and types def the .prop("value") is abcdef but the .attr("value") remains abc.

In most cases, the browser treats the attribute value as the starting value for the property, but Boolean attributes such as checked or disabled have unusual semantics.

For example, consider the markup <input type="checkbox" checked>. The presence of the checked attribute means that the DOM .checked property is true, even though the attribute does not have a value. In the code above, the checked attribute value is an empty string (or undefined if no attribute was specified) but the checked property value is true.

Before jQuery 1.6, .attr("checked") returned the Boolean property value (true) but as of jQuery 1.6 it returns the actual value of the attribute (an empty string), which doesn’t change when the user clicks the checkbox to change its state.

There are several alternatives for checking the currently-checked state of a checkbox. The best and most performant is to use the DOM property directly, as in this.checked inside an event handler when this references the element that was clicked. In code that uses jQuery 1.6 or newer, the new method $(this).prop("checked") retrieves the same value as this.checked and is relatively fast. Finally, the expression $(this).is(":checked") works for all versions of jQuery.

Ajax

Bugs Fixed:

  • #6481: revert $.param should treat empty arrays/objects like empty strings
  • #7881: Make compatible with XHR 2
  • #8417: When posting AJAX and the data has “??” is formats it to jQuery<timestamp>?
  • #8744: .ajax() jsonp requests are not handled correctly when hitting timeout
  • #8884: jqXHR breaks names of custom header fields

Attributes

Performance Improvements

jQuery 1.6 .attr("value")

jQuery 1.6 .attr("name", "value")

jQuery 1.6 .val() (get)

Tests and Data:

.prop(), .removeProp(), and .attr()

(See the description of what’s changed in the “Breaking Changes” section, above.)

Boolean Attributes

In jQuery 1.6 Boolean attributes (such as selected, checked, etc.) can now be toggled by passing in true or false to .attr() to either add or remove them. For example:

$("#checkbox").attr("checked", true); // Checks it
$("#checkbox").attr("checked", false); // Unchecks it

Extensibility of .attr() and .val()

Two new hooks have been added in order to make it easier to add in special handling for specific attributes (jQuery.attrHooks) or form input values (jQuery.valHooks).

For example:

jQuery.attrHooks.selected = {
	set: function( elem, value ) {
		if ( value === false ) {
			jQuery.removeAttr(elem, “selected”);
			return value;
		}
	}
};

Both of the hooks behave very similarly to jQuery’s built-in CSS hooks (allowing you to specify either a get or set method for an attribute (or value)) to handle those specific cases.

Bugs Fixed:

  • #1591: IE “Invalid Argument” $(‘table’).attr(‘non-existent’)
  • #3116: .attr does not work with SVG IDLs
  • #3786: removeAttr should use jQuery.props
  • #4283: .attr(‘checked’) & XHTML 1.1 Strict
  • #4464: IE cannot get width attribute of detached IMG element
  • #4978: jQuery.prop missing cellpadding?
  • #5413: tag “img” width/height attribute is zero (IE)
  • #6562: using .attr() to set the ‘target’ attribute, with a node that has ID of ‘target’
  • #6708: Opera has inconsistent result for usemap attribute value
  • #6823: Make .val(value) faster for common use case
  • #7472: $(‘form’).attr(‘id’) return DOM Element
  • #7485: Inconsistency between has [attribute] selector and attr() method
  • #7709: Permission denied to access property ‘nodeType’ from a non-chrome Firefox/3.5.15
  • #7996: Safari $(‘script’).attr(‘event’); Bug
  • #8117: .removeAttr don’t works with select element’s size attribute
  • #8150: removeAttr issue in webkit, firefox
  • #8255: support for list attribute
  • #8418: set name parameter using attr() method in IE 7
  • #8457: attrHooks
  • #8570: .val method returning “on” for dynamically created radio buttons in ie9
  • #8699: .attr() returns -1 on missing attribute instead of undefined
  • #8772: Using .attr() to set input type ‘range’ causes script error in IE9
  • #8997: new attribute “form” (HTML5) is not supported, .attr(‘form’) not working properly
  • #9037: $(‘blah’).attr(‘onclick’) return event in Firefox

Build

Bugs Fixed:

  • #8854: Bug in minifier process

Core

jQuery.map( Object )

It’s now possible to map the properties of a JavaScript object using the jQuery.map method. For example:

var counts = { first: 1, second: 2 };
	
counts = jQuery.map( counts, function( value ) {
	return value++;
});

Bugs Fixed:

  • #2616: A better jQuery.map
  • #4366: $.each fails in IE with document.styleSheets
  • #6690: Store references to location and navigator objects
  • #7049: making jQuery.noConflict() callable anytime
  • #7783: Fixing $.proxy to work like (and use) Function.prototype.bind
  • #7862: jQuery.globalEval(): Execution Delayed By Remote Scripts in Firefox
  • #7990: Script space quota exhausted error when creating a large HTML block with jQuery constructor in Firefox
  • #8893: jQuery.proxy( context, name ) bug in 1.6b1
  • #8984: jQuery doesn’t parse html from string correctly!
  • #8993: jQuery.map( emptyNodeList ) enumerating properties.

CSS

Relative CSS

We’ve ported the functionality from the .animate() method, giving you the ability to update CSS properties using relative values. You can now prefix a CSS value with “+=” or “-=” to update the property relatively, in relation to the current value.

// Move an item 10px over
$("#item").css("left", "+=10px");

Bugs Fixed:

  • #6135: jQuery tries to access the .style attribute of text tags
  • #7345: Support relative values for $().css()
  • #7730: offset.js: setOffset uses parseInt to parse css values which may contain floating point numbers
  • #8401: minor enhancement to opacity cssHooks
  • #8402: jQuery.cssProps is useless in all browsers but IE6/7/8
  • #8403: jQuery Bulldozes Other IE Filters When Assigning Opacity

Data

Performance Improvements

Large performance improvements to .data() were achieved by improving the performance of event triggering. jQuery’s .data() method triggers getData and setData events which allow for greater levels of extensibility for plugins, improving how they’re triggered allows .data() to become even faster.

jQuery 1.6 .data() (get and set)

Tests and Data:

Bugs Fixed:

  • #7328: Should data-foo-bar be accessible via .data( ‘fooBar’ ) as well as .data( ‘foo-bar’ )

Deferreds

deferred.always()

In 1.5, when you wanted to take the exact same action whether a deferred was resolved or rejected, you had to use a named function and pass it to “then” twice:

function callback() {
    // the deferred has been resolved or rejected
}

defer.then( callback, callback );

With “always”, you can do it inline:

defer.always(function() {
    // the deferred has been resolved or rejected
});

deferred.pipe()

Chaining asynchronous tasks can be tedious, especially when you want to return a Promise for the whole chain:

function chainedAjax( url ) {
    return $.Deferred(function( defer ) {
        $.ajax( url ).then( function( url2 ) {
            $.ajax( url2 ).then( defer.resolve, defer.reject )
        }, defer.reject ).promise();
    });
}

With “pipe”, everything is much more readable and natural:

function chainedAjax( url ) {
    return $.ajax( url ).pipe(function( url2 ) {
        return $.ajax( url2 );
    });
}

It can also be used to filter resolve and/or rejection values:

var request = $.ajax( url ).pipe(function( data ) {
   return data.value;
});

request.done(function( value ) {
    // we get the value field of the original response
});

Effects

Synced Animations

In jQuery you can have multiple animations running simultaneously (even multiple on the same element, animating different properties). In 1.6 we’ve introduced an enhancement that ensures that all animations are synced to the same timer interval. This had the potential to create problems before as animations could become slightly out-of-sync (even by a couple milliseconds) resulting in slightly “off” animations.

Smoother Animations

Additionally jQuery is now using the new requestAnimationFrame method provided by browsers to make our animations even smoother. We can use this functionality to avoid calling timers and instead depend upon the browser to provide the best possible animation experience.

.promise()

Just like $.ajax() before it, $.animate() gets “deferred”. jQuery objects can now return a Promise to observe when all animations on a collection have completed:

$(".elements").fadeOut();

$.when( $(".elements") ).done(function( elements ) {
    // all elements faded out
});

Bugs Fixed:

  • #7917: .animate() when used with large groups of elements is not “in sync”
  • #7934: $.fn.animate to implement deferreds
  • #7974: Cleanup effects.js to improve performances and reduce filesize
  • #8099: SPAN element becomes block level on show()
  • #8101: use requestAnimationFrame instead of setInterval for animations, when available

Event

Performance Improvements

(As mentioned while discussing .data() performance, the performance of event triggering has been improved.)

jQuery.holdReady()

jQuery provides a mechanism for delaying the execution of the ready event (primarily for plugin authors). The API for this mechanism has been improved in 1.6, resulting in a single, simple, method:

jQuery.holdReady( true ); // Pause execution of ready event
// later...
jQuery.holdReady( false ); // Resume execution

Bugs Fixed:

  • #5884: live mouseenter/mouseleave events don’t fire as expected when nested
  • #6514: Mouseenter and mouseleave events not able to be triggered if bound by live
  • #6913: namespaced event bubbleing wrong
  • #6993: .bind() and .one() don’t allow a function as data
  • #7071: Accessing the ‘type’ property on VML elements fails on IE
  • #7883: .delegate (and .live) should accept false as the fn arg, like .bind
  • #8018: Unsafe access to frameElement causes error in crossdomain (i)frames
  • #8272: Exceptions in plain JS object event handlers swallowed by jQuery
  • #8712: Custom events don’t bubble up to window
  • #8732: Incorrect feature detect for IE9 focusin/focusout
  • #8753: jQuery 1.6: jQuery.Event contstructor to support setting properties
  • #8755: binding to beforeunload throws an error in IE6, 7, 8 on page unload
  • #8777: jQuery 1.6: undelegate() accepts custom namespaced events
  • #8788: Reorganize jQuery.event.trigger to use loop instead of recursion
  • #8790: Optimize non-attached events such as data events
  • #8803: jQuery.holdReady() method

Manipulation

Bugs Fixed:

  • #1954: val() returns innerHTML for button elements in IE
  • #6180: jQuery.clean should not touch script tags that are not of type text/javascript
  • #7623: Exception thrown in replaceWith
  • #7885: jQuery .offset doesn’t property works when current offset is float (which is possible in FireFox)
  • #8060: Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM.
  • #8500: radios and checkboxes revert to default (HTML) state when wrapped in IE

Misc

Bugs Fixed:

  • #8203: Remove un-needed “someVar = null;”s
  • #8851: Wraps strings with double quotes in sources and tests
  • #8882: Tests: Update QUnit usage, replace id=main with id=qunit-fixture

Offset

Bugs Fixed:

  • #7931: scrollTop and scrollLeft setters return null when called on empty jquery object

Selector

:focus Selector

In jQuery 1.6 we now ensure that the :focus selector works properly across all browsers. You can use this selector to find the currently focused element on the page (such as a form input).

$("input:focus").addClass("active");
  • #3685: Selector fails for forms with an element named “name”
  • #4321: $(“#”) returns undefined
  • #8105: :focus selector filter

Support

Bugs Fixed:

  • #9028: IE8 crashes while loading 1.6rc1 if using body background image

Traversing

find(), closest(), and is() now all take DOM elements and jQuery objects

In jQuery 1.6 we’ve ensured that find(), closest(), and is() can all take DOM elements and jQuery objects as arguments. This gives you alternatives for filtering sets of elements based upon the passed-in elements.

// Only returns .test elements if they're inside of a div
$("div").find( $(".test") )

Bugs Fixed:

  • #2773: $.fn.is and $.fn.not should accept DOMelements and jQuery collections
  • #5712: Allow jQuery.fn.is to accept a function
  • #6912: $().add(selectElement) adds option children instead
  • #7369: $(‘<div>ff</div>’).closest(‘[attr]’); raises exception in all browsers
  • #8609: Result of .find(” “) is undefined

jQuery 1.6 RC 1 Released

Posted on by

This is a preview release of jQuery. We’re releasing it so that everyone can start testing the code in their applications, making sure that there are no major problems.

You can get the code from the jQuery CDN:

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.6 RC 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

jQuery 1.6 RC 1 Change Log

The current change log of the 1.6 RC 1 release.

Ajax

  • #6481: revert $.param should treat empty arrays/objects like empty strings
  • #7881: Make compatible with XHR 2
  • #8417: When posting AJAX and the data has “??” is formats it to jQuery<timestamp>?
  • #8744: .ajax() jsonp requests are not handled correctly when hitting timeout
  • #8884: jqXHR breaks names of custom header fields

Attributes

  • #3786: removeAttr should use jQuery.props
  • #4283: .attr(‘checked’) & XHTML 1.1 Strict
  • #4464: IE cannot get width attribute of detached IMG element
  • #4978: jQuery.prop missing cellpadding?
  • #5413: tag “img” width/height attribute is zero (IE)
  • #6562: using .attr() to set the ‘target’ attribute, with a node that has ID of ‘target’
  • #6708: Opera has inconsistent result for usemap attribute value
  • #6823: Make .val(value) faster for common use case
  • #7472: $(‘form’).attr(‘id’) return DOM Element
  • #7485: Inconsistency between has [attribute] selector and attr() method
  • #7709: Permission denied to access property ‘nodeType’ from a non-chrome Firefox/3.5.15
  • #7996: Safari $(‘script’).attr(‘event’); Bug
  • #8117: .removeAttr don’t works with select element’s size attribute
  • #8150: removeAttr issue in webkit, firefox
  • #8255: support for list attribute
  • #8418: set name parameter using attr() method in IE 7
  • #8457: attrHooks
  • #8570: .val method returning “on” for dynamically created radio buttons in ie9
  • #8699: .attr() returns -1 on missing attribute instead of undefined
  • #8772: Using .attr() to set input type ‘range’ causes script error in IE9

Build

  • #8854: Bug in minifier process

Core

  • #2616: A better jQuery.map
  • #3116: .attr does not work with SVG IDLs
  • #4366: $.each fails in IE with document.styleSheets
  • #6690: Store references to location and navigator objects
  • #7049: making jQuery.noConflict() callable anytime
  • #7783: Fixing $.proxy to work like (and use) Function.prototype.bind
  • #7862: jQuery.globalEval(): Execution Delayed By Remote Scripts in Firefox
  • #7990: Script space quota exhausted error when creating a large HTML block with jQuery constructor in Firefox
  • #8882: Tests: Update QUnit usage, replace id=main with id=qunit-fixture
  • #8893: jQuery.proxy( context, name ) bug in 1.6b1

Css

  • #6135: jQuery tries to access the .style attribute of text tags
  • #7345: Support relative values for $().css()
  • #7730: offset.js: setOffset uses parseInt to parse css values which may contain floating point numbers
  • #8401: minor enhancement to opacity cssHooks
  • #8402: jQuery.cssProps is useless in all browsers but IE6/7/8
  • #8403: jQuery Bulldozes Other IE Filters When Assigning Opacity

Data

  • #7328: Should data-foo-bar be accessible via .data( ‘fooBar’ ) as well as .data( ‘foo-bar’ ) ?

Effects

  • #7917: .animate() when used with large groups of elements is not “in sync”
  • #7934: $.fn.animate to implement deferreds
  • #7974: Cleanup effects.js to improve performances and reduce filesize
  • #8099: SPAN element becomes block level on show()
  • #8101: use requestAnimationFrame instead of setInterval for animations, when available

Event

  • #5884: live mouseenter/mouseleave events don’t fire as expected when nested
  • #6514: Mouseenter and mouseleave events not able to be triggered if bound by live
  • #6913: namespaced event bubbleing wrong
  • #6993: .bind() and .one() don’t allow a function as data
  • #7071: Accessing the ‘type’ property on VML elements fails on IE
  • #7883: .delegate (and .live) should accept false as the fn arg, like .bind
  • #8018: Unsafe access to frameElement causes error in crossdomain (i)frames
  • #8272: Exceptions in plain JS object event handlers swallowed by jQuery
  • #8712: Custom events don’t bubble up to window
  • #8732: Incorrect feature detect for IE9 focusin/focusout
  • #8753: jQuery 1.6: jQuery.Event contstructor to support setting properties
  • #8755: binding to beforeunload throws an error in IE6, 7, 8 on page unload
  • #8777: jQuery 1.6: undelegate() accepts custom namespaced events
  • #8788: Reorganize jQuery.event.trigger to use loop instead of recursion
  • #8790: Optimize non-attached events such as data events
  • #8803: jQuery.holdReady() method

Manipulation

  • #1954: val() returns innerHTML for button elements in IE
  • #6180: jQuery.clean should not touch script tags that are not of type text/javascript
  • #7623: Exception thrown in replaceWith
  • #7885: jQuery .offset doesn’t property works when current offset is float (which is possible in FireFox)
  • #8060: Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM.
  • #8500: radios and checkboxes revert to default (HTML) state when wrapped in IE

Misc

  • #8203: Remove un-needed “someVar = null;”s
  • #8851: Wraps strings with double quotes in sources and tests

Offset

  • #7931: scrollTop and scrollLeft setters return null when called on empty jquery object

Selector

  • #3685: Selector fails for forms with an element named “name”
  • #4321: $(“#”) returns undefined
  • #8105: :focus selector filter

Traversing

  • #2773: $.fn.is and $.fn.not should accept DOMelements and jQuery collections
  • #5712: Allow jQuery.fn.is to accept a function
  • #6912: $().add(selectElement) adds option children instead
  • #7369: $(‘<div>ff</div>’).closest(‘[attr]’); raises exception in all browsers
  • #8609: Result of .find(” “) is undefined

Official Plugins: A Change in The Roadmap

Posted on by

Barely six months ago, we announced that we were adopting three plugins developed chiefly at Microsoft – Templating, Data Link, and Globalization – as official plugins, to be developed in accordance with the standards of and supported by the jQuery project. Today, we’d like to take an opportunity to share what we’ve learned in the interim and announce a change in course for these and the rest of jQuery’s “Official Plugins.”

There never has been a dedicated jQuery team for supporting Official Plugins. Prior to the adoption of Microsoft’s contributions, the plugins that the jQuery project supported – Color, Easing, bgiframe, Mousewheel, Metadata, and Cookie – were dead-simple, effective plugins for achieving a particular utilitarian end. They required little maintenance, stalwartly serving with little fuss from version to version of jQuery core. In recent months, as we noticed an uptick in questions related to the three new plugins, we realized there was a disconnect. Though development on beta versions of the plugins continued at Microsoft, the planned jQuery sub-team that was meant to collaborate with and adopt Microsoft’s work never formed.

As demand has grown, based on the existence of the beta versions of the plugins as well as promises made in the posts, we’ve sensed the rumbles, the confusion, and the confused exclamations: “I thought templating was going to be in 1.5!” Because of your concerns and ours, we’ve decided to eliminate the notion of Official Plugins altogether. It’s a difference that’s both semantic and symbolic, but this is its material impact:

Many of the original supported jQuery plugins (Color, Easing, and Mousewheel) will continue to be supported and maintained by the jQuery Core Dev Team. The Metadata plugin will be deprecated, in favor of similar functionality provided by jQuery 1.4.3 and above. The Cookie plugin will continue to be maintained by Klaus Hartl.

The jQuery UI project will take ownership over plugins on which it has a current or future dependency: Templating, Globalization, and bgiframe. The jQuery UI team plans to begin work anew on templating and globalization, starting with the normal process for UI plugins: Collaborative development on a spec. While some may perceive this as a setback, given existing progress on the current jquery-tmpl plugin, it is really an opportunity for us to work in tandem with the community — Microsoft included — to develop an implementation that will be effective and flexible. The “official plugins” Microsoft has been developing have always been in a beta state, subject to change and with significant revisions planned for the Beta 2 release, but we recognize (and appreciate) those of you who have jumped in and started to experiment and use them in your applications. The UI team is still in the early planning stages for the Templating and Globalization plugins, and we invite you to visit the planning wiki and share your thoughts about development.

Microsoft will continue to develop and support the Data Link plugin independently, and will take ownership of hosting the documentation for the existing plugins.  In the short term, however, we’ll keep the documentation for these plugins on api.jquery.com, in order preserve a reference for anyone who needs it. For more on Microsoft’s plans for Data Link, please read their Official Plugins Update. We value Microsoft’s ongoing contribution to jQuery, providing developer time and financial support for a number of efforts, including the jQuery UI Grid and the jQuery conferences.

We realize that some of these details may seem in flux or merely organizational, but we know that it’s important to tell the community of changes like these as they’re happening so that you can make the best decisions for your applications as soon as possible. We hope you understand why we’ve had to make these shifts and encourage you to get involved and help us push these important projects along!

Addendum: So Why Weren’t Templates in 1.5?

Though we initially announced that the jquery-tmpl plugin would be part of jQuery Core in version 1.5, the plugin was, as it is today, still in the Beta 1 stage. Thus, when the time came last December to really evaluate new features for 1.5, it was not really considered ready for inclusion. Given what we’ve explained above, we hope it’s clear that we don’t plan to include templating directly in Core in the near future. The jQuery UI Templating plugin will be a standalone plugin with no dependencies on any other part of jQuery UI, and will become the only templating solution “officially” supported by the project, though jQuery will, of course, continue to work with any JavaScript templating engine that spits out good, old-fashioned strings of HTML.

jQuery 1.6 Beta 1 Released

Posted on by

We’re nearing the completion of jQuery 1.6! We want to get a beta out so that everyone can start testing the code in their applications, making sure that there are no major problems.

jQuery 1.6 Beta 1

You can get the code from the jQuery CDN:

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.6 Beta 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

jQuery 1.6 Beta 1 Change Log

The current change log of the 1.6 release.

  • #6782 Optimizes regex for innerHTML to allow more html snippets to use faster method.
  • #7328 When getting data- attributes, after-cap any embedded dashes per the W3C HTML5 specs.
  • #4146 Fixing inconsistency with width/height on inputs.
  • #7345 Adds support for explicit/relative string values in .css().
  • #7783 Fixes $.proxy to work like (and use) Function.prototype.bind
  • #8753 Allows special properties to be explicitly defined on jQuery.Event objects.
  • #7587 Bypass regexp filter on $.parseJSON and use native thrown exceptions if window.JSON.parse is available.
  • #8150 Fixes an issue where if removing the width and height attributes in IE6/7, setting to “” actually sets to 0 instead of auto.
  • #6562 Fixes an issue where if you have a DOM node with the ID of ‘target’ and you try and set a target it fails.
  • #8744 Makes sure script transport abort method actually removes the script tag even if readyState exists.
  • #8712 Bubble custom events to the window when they are triggered.
  • #8635 Fixes an uncaught exception in Firefox and removes unnecessary “manual” garbage collection.
  • #8568 Fixes an issue where live event callbacks can get out of order in the event liveHandler function.
  • #8417 Disables the JSONP replacement for $.ajax() JSON POST.
  • #8099 Fixes an issue where SPAN elements become block level on show().
  • #8593 Fixes an issue where DOM 0 event handlers are called twice when a separate handler is attached via jQuery
  • #8402 Fixes an issue where browsers implementing window.getComputedStyle completely ignore the “fixed property” in jQuery.css(). This makes the implementation of jQuery.cssProps more generic.
  • #8401 and #8403 .Fixes an issue where jQuery “bulldozes” other IE filters when setting opacity
  • #7071 Corrects an issue where accessing the ‘type’ property on VML elements fails on IE
  • #4321 Fixes an issue where $(“#”) returns “undefined” and an exception on Opera 9.6.
  • #7883 Just like .bind, .delegate (and .live) now accept false as a shortcut for function(){return false;}.
  • #2773 $.fn.is and $.fn.not now accept DOM elements and jQuery collections.
  • #8777 undelegate() now accepts custom namespaced events.
  • #3116 .attr() now also works with read only interfaces of the SVG specification.
  • #8732 Changes feature detection for focusin event support so that IE9 won’t have duplicate vents.
  • #7369 It is now possible to use .closest() on disconnected nodes with attributes.
  • #4366 Fixes an issue where $.each was failing when passed document.styleSheets in IE.
  • #7931 Corrects an issue where both the $.fn.scrollTop and $.fn.scrollLeft setters returned null when called on an empty jQuery object.
  • #8101 We now use requestAnimationFrame instead of setInterval for animations when it’s available
  • #8018 Fixes an issue where unsafe access to frameElement causes errors in crossdomain (i)frames
  • #6180 jQuery.clean no longer affects or modifies script tags which are not of the type text/javascript
  • #3685 Corrects a previous failure when selecting forms with an element named “name”
  • #8790 For cases where an event that is triggered is not native (ie. should not have inline handlers) we should bail out immediately for optimization purposes
  • #8814 Fixed a minor issue where in core.js, we don’t need to check for indexOf in the fallback inArray definition.
  • #7472 and #3113 Fixes an issue where if attribute names in forms share the same names as attribute types (eg, id, name etc) a conflict was being experienced
  • #7054 Ensures that the DOM element ref in an event handler is removed by cleanData to avoid an IE6/7/8 memory leak.
  • #8418 Fixes an issue where attr(“name”,”value”) is not working to set name attribute value in IE 7
  • #7996 Fixes a Safari 5.0.3 bug when trying to use jQuery’s .attr() on a script tag to access an attribute named “event”.
  • #8772 Fixes an issue where IE9 fails to gracefully handle the setting of unsupported input types such as ‘range’.
  • #4283 As part of the .attr() rewrite, false will remove Boolean attributes such as checked.
  • #8699 .attr() no longer returns -1 on missing attributes instead of undefined.
  • #6837 Corrects an issue where IE fails to return the correct value of the default/first item in the select after a form reset, instead returning an empty string
  • #4464 Fixes a bug where IE was unable to get the width attribute of detached IMG elements
  • #7485 Fixes an inconsistency where a selector doesn’t return all elements which have the attribute even if upon checking with the attr() method it returns a value.

jQuery 1.5.2 Released

Posted on by

jQuery 1.5.2 is now out! This is the second minor release on top of jQuery 1.5 and lands a number of fixes for bugs.

We would like to thank the following contributors that provided patches towards this release: azatoth, dmethvin, gnarf37, jaubourg, jboesch, jeresig, jessthrysoee, mathiasbynens, murz, rdworth, rwldrn, and timmywil.

We’d especially like to thank our bug triage team who assisted in narrowing down some of the important fixes needed for this release.

Downloading

As usual, we provide two copies of jQuery, one minified and one uncompressed (for debugging or reading).

You can feel free to include the above URLs directly into your site and you will get the full performance benefits of a quickly-loading jQuery.

Additionally you can also load the URLs directly from Microsoft and Google’s CDNs:

Microsoft CDN: http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.2.min.js
Google CDN: https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js

jQuery 1.5.2 Changelog

As this was a bug fix release there are no new features to report upon.

Closed Tickets

A full list of all bugs and tickets closed are as follows:

  • #6158 Fixed replaceWith from throwing errors on non existent elements.
  • #7340 We now use a single capturing handler to simulate bubbling focusin/focusout event on non-IE browsers. Allows native DOM methods to fire events other than the currently active one back into jQuery.
  • #8353 Reverted. Adds a catch block in resolveWith so that the finally block gets executed in IE7 and IE6. Fixes #8438 – an issue where the full functions stack wasn’t visible when debugging in Google Chrome.
  • #8380 Make it so that $(‘:text’) matches <input> as ‘type=text’ is the implied default.
  • #8421 Makes sure resolveWith can be called with only one parameter.
  • #8423 Never set X-Requested-With header automagically for cross-domain requests. Fixes an issue where all cross-domain ajax requests are pre-flighted and require extra additional options.
  • #8456 Fixed an issue where trigger(‘mouseover’) was no longer triggering mouseenter. We make sure parent is not null before crawling into its lap, so mouseenter is triggered on a mouseover event.
  • #8509 Makes URL regexp less overzealous and ensures it recognizes URL schemes which do not contain a conformant hierarchical structure (as per section 2.1.2 of http://www.ietf.org/rfc/rfc2718.txt). Also adds about: and adobe air’s app: and app-storage: to the list of local protocols and provides a failover in case document.location is illformed.
  • #8536 Introduced submodules to the jQuery repository on GitHub.
  • #8381 Fixed .is(“div”) to work on disconnected nodes in IE 9.
  • #8316 Fixed .offset() setter on fixed elements in WebKit.
  • #3333 Fixed incorrect .css(“marginRight”) in WebKit.
  • #8692 Fixed an issue where the arguments object sometimes ended up with undefined values outside the $.when method.
  • #8346 Fixed a compatibility issue with jQuery.camelCase() and IE9 prefixes.
  • #8203 Removed some unnecessary nulling of elements done in the name of an IE memory cleanup.
  • #8519 Prevent the core makefile from applying minification if nothing in the code has actually changed.
  • #8587 Fixed the jQuery-git.js cron-job to ensure that it is being regularly updated.
  • #8635 Corrected an issue with Firefox 3.6 where an issue with getComputedStyle() was resulting in uncaught exceptions.

jQuery 1.5.2 RC 1 Released

Posted on by

Progress is moving along well on the second update of jQuery 1.5 – we’re pleased to announce the release of its first release candidate! Barring any major bugs this should be the code that we end up shipping for jQuery 1.5.2 (which will be happening on March 31st).

jQuery 1.5.2 Release Candidate 1

You can get the code from the jQuery CDN:

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.5.2 RC 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

jQuery 1.5.2 RC 1 Change Log

The current change log of the 1.5.2 release.

  • #6158 Fixed replaceWith from throwing errors on non existant elements.
  • #7340 We now use a single capturing handler to simulate bubbling focusin/focusout event on non-IE browsers. Allows native DOM methods to fire events other than the currently active one back into jQuery.
  • #8353 Reverted. Adds a catch block in resolveWith so that the finally block gets executed in IE7 and IE6. Fixes #8438 – an issue where the full functions stack wasn’t visible when debugging in Google Chrome.
  • #8380 Make it so that $(‘:text’) matches <input> as ‘type=text’ is the implied default.
  • #8421 Makes sure resolveWith can be called with only one parameter.
  • #8423 Never set X-Requested-With header automagically for cross-domain requests. Fixes an issue where all cross-domain ajax requests are pre-flighted and require extra additional options.
  • #8456 Fixed an issue where trigger(‘mouseover’) was no longer triggering mouseenter. We make sure parent is not null before crawling into its lap, so mouseenter is triggered on a mouseover event.
  • #8509 Makes URL regexp less overzealous and ensures it recognizes URL schemes which do not contain a conformant hierarchical structure (as per section 2.1.2 of #http://www.ietf.org/rfc/rfc2718.txt). Also adds about: and adobe air’s app: and app-storage: to the list of local protocols and provides a failover in case document.location is illformed.
  • #8536 Introduced submodules to the jQuery repository on GitHub.
  • #8381 Fixed .is(“div”) to work on disconnected nodes in IE 9.
  • #8316 Fixed .offset() setter on fixed elements in WebKit.
  • #3333 Fixed incorrect .css(“marginRight”) in WebKit.

jQuery 1.5.1 Released

Posted on by

jQuery 1.5.1 is now out! This is the first minor release on top of jQuery 1.5 and lands a number of fixes for bugs.

We would like to thank the following contributors that provided patches towards this release: antonkovalyov, csnover, danheberden, davidmurdoch, dmethvin, gnarf37, jaubourg, jeresig, jitter, jrburke, lrbabe, mathiasbynens, rwldrn, SlexAxton, and voxwerk.

We’d especially like to thank our bug triage team who assisted in narrowing down some of the important fixes needed for this release.

Downloading

As usual, we provide two copies of jQuery, one minified and one uncompressed (for debugging or reading).

You can feel free to include the above URLs directly into your site and you will get the full performance benefits of a quickly-loading jQuery.

Additionally you can also load the URLs directly from Microsoft and Google’s CDNs:

Microsoft CDN: http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js

Google CDN: https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js

1.6 Roadmap Meeting

The core jQuery dev team is now taking proposals for changes to land in jQuery 1.6. Right now we’re shooting to release jQuery 1.6 late April/early May and will be meeting to discuss the submitted proposals at Noon EST on March 7th (the meeting will be in #jquery-meeting on irc.freenode.net).

Please submit your proposals through the following form in advance of the March 7th meeting.

jQuery 1.5.1 Changelog

jQuery 1.5.1 Test Swarm Results

API Documentation: jQuery 1.5.1 API Documentation

As this was a bug fix release there are no new features to report upon. The only changes are as follows:

jQuery now supports Internet Explorer 9 as a top level browser. All known bugs have been fixed and/or been reported to the IE team for resolution in the final release.

Three new options were added to jQuery.ajax():

  1. isLocal: Allow the current environment to be recognized as “local,” (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
  2. mimeType: A mime type to override the XHR mime type.
  3. xhrFields A map of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed.

Closed Tickets

A full list of all bugs and tickets closed are as follows:

  • #2551 Make sure .val() works after form.reset() in IE
  • #4537 Make sure .clone(true) correctly clones namespaced events
  • #4966 Don’t add “px” to unit-less properties when animating them
  • #6774 Make sure we only access parentNode if it’s available. Fixes an issue where after an option tag has been detached, an elem.parentNode error would be thrown.
  • #6911Prevent action on disabled elements, both triggering and bound via .live()
  • #7531 Fix again for IE9RC. Enhances ajaxSetup so that it can take an optional target option, in which case target will be updated instead of ajaxSettings. That way, fields that shouldn’t be deep extended can be listed and dealt with in one place. jQuery.ajax now makes use of ajaxSetup with target to create its internal settings object
  • #7568 Follow-up fix for #5862. Objects with a length property weren’t serialized properly by jQuery.param
  • #7653 Changes regexp to detect local protocol so that it will accept any protocol finishing by -extension
  • #7668 Sizzle and jQuery QUnit tests are out of sync
  • #7912 This change makes .cur() more .cssHooks friendly. .cur() now returns the unmodified value by .css() if it isn’t a number, number-alike or a value that needs a fallback to 0.
  • #7922 Fixed an issue where live(‘click’) doesn’t fire when live(‘submit’) is bound first in IE
  • #7945 Make jQuery.param() serialize plain objects with a property named jquery correctly
  • #8033 jQuery 1.4.4+ fails to load on pages with old Prototype (<= 1.5) or Current Prototype + Scriptaculous in IE
  • #8039 Selectors with HTML5 input types not work in IE6/7
  • #8052 Update jQuery.support.noCloneEvent test to function properly in IE9
  • #8095 Properly handles the case where browser cache needs to be bypassed while server-side logic still delivers proper 304 responses. Unit test added
  • #8098 Use the fast document.head when available
  • #8099 Always restore to correct display value based on element’s expected default display
  • #8107 Fix argument handling for $.ajax for multiple method signatues and add test case
  • #8108Temporary fix for jQuery metadata being exposed on plain JS objects when serializing with JSON.stringify to avoid compatibility-breaking changes. A proper fix for this will be landed in 1.6
  • #8115 Renames all references to jXHR with jqXHR in the code (like was done in the doc)
  • #8123 The default for .clone() is to not clone any events
  • #8125 Status is set to 200 for requests with status 0 when location.protocol if “file:”. Added test/localfile.html to control it works
  • #8129 Fix cloning multiple selected options in IE8
  • #8135 Makes sure any exception thrown by Firefox when trying to access an XMLHttpRequest property when a network error occured is caught and notified as an error. Added test/networkerror.html to test the behavior
  • #8138 Access to document.location is made only once at load time and if it fails (throwing an exception in IE when document.domain is already set), we use the href of an A element instead
  • #8145 Added readyWait tests
  • #8146 introducing the xhrFields option with is a map of fieldName/fieldValue to set on the native xhr. Can be used to set withCredentials to true for cross-domain requests if needed
  • #8152 applying the same special cases for protocol “chrome-extension:” as were for “file:” (needs tests). Re-organizes and fixes the handling of special cases for HTTP status code in the xhr transport
  • #8177 XHR transport now considers 304 Not Modified responses as 200 OK if no conditional request header was provided (as per the XMLHttpRequest specification)
  • #8193 Fixes abort in prefilter. No global event will be fired in that case even if the global option is set to true. Unit test added
  • #8198 Remove unnecessary “script.type = text/javascript;”
  • #8200 Unexpose $.support._scriptEval as it’s not needed. Use a private var instead
  • #8209 Make sure that mousing over Chrome “internal div” doesn’t trigger a mouseleave
  • #8219 Introduces the mimeType option to override content-type header in conversion (and in native xhr when possible). Adds companion overrideMimeType method on jqXHR object (it simply sets the option)
  • #8220 Remove backslashes from tag name filter
  • #8245 Ajax now ensures header names are capitalized so that non-compliant xhr implementations don’t override them
  • #8250 ajax does not work in opera 10 widgets
  • #8277 Sets data to undefined rather than null when it is not provided in ajax helpers so that it won’t revent data set in ajaxSettings from being used.
  • #8297 Make sure response headers with empty values are handled properly and do not prevent proper parsing of the entire response headers string.
  • #8353 Adds a catch block in resolveWith so that the finally block gets executed in IE7 and IE6.
  • #8365 Make sure that IE 9 still clones attributes.

jQuery 1.5.1 RC 1 Released

Posted on by

We’re nearing the first update to jQuery 1.5 – and we’re pleased to announce the release of the first release candidate! Barring any major bugs this should be the code that we end up shipping for jQuery 1.5.1 (which will be happening on February 24th).

jQuery 1.5.1 Release Candidate 1

You can get the code from the jQuery CDN:

You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please file a bug and be sure to mention that you’re testing against jQuery 1.5.1 RC 1.

We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. We’ve set up a full page of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!

jQuery 1.5.1 RC 1 Change Log

The current change log of the 1.5.1 release.

  • #2551 Make sure .val() works after form.reset() in IE
  • #4537 Make sure .clone(true) correctly clones namespaced events
  • #4966 Don’t add “px” to unit-less properties when animating them
  • #6774 Make sure we only access parentNode if it’s available. Fixes an issue where after an option tag has been detached, an elem.parentNode error would be thrown.
  • #7531 Fix again for IE9RC. Enhances ajaxSetup so that it can take an optional target option, in which case target will be updated instead of ajaxSettings. That way, fields that shouldn’t be deep extended can be listed and dealt with in one place. jQuery.ajax now makes use of ajaxSetup with target to create its internal settings object
  • #7568 Follow-up fix for #5862. Objects with a length property weren’t serialized properly by jQuery.param
  • #7653 Changes regexp to detect local protocol so that it will accept any protocol finishing by -extension
  • #7668 Sizzle and jQuery QUnit tests are out of sync
  • #7912 This change makes .cur() more .cssHooks friendly. .cur() now returns the unmodified value by .css() if it isn’t a number, number-alike or a value that needs a fallback to 0.
  • #7922 Fixed an issue where live(‘click’) doesn’t fire when live(‘submit’) is bound first in IE
  • #7945 Make jQuery.param() serialize plain objects with a property named jquery correctly
  • #8033 jQuery 1.4.4+ fails to load on pages with old Prototype (<= 1.5) or Current Prototype + Scriptaculous in IE
  • #8039 Selectors with HTML5 input types not work in IE6/7
  • #8052 Update jQuery.support.noCloneEvent test to function properly in IE9
  • #8095 Properly handles the case where browser cache needs to be bypassed while server-side logic still delivers proper 304 responses. Unit test added
  • #8098 Use the fast document.head when available
  • #8099 Always restore to correct display value based on element’s expected default display
  • #8107 Fix argument handling for $.ajax for multiple method signatues and add test case
  • #8108Temporary fix for jQuery metadata being exposed on plain JS objects when serializing with JSON.stringify to avoid compatibility-breaking changes. A proper fix for this will be landed in 1.6
  • #8115 Renames all references to jXHR with jqXHR in the code (like was done in the doc)
  • #8123 The default for .clone() is to not clone any events
  • #8125 Status is set to 200 for requests with status 0 when location.protocol if “file:”. Added test/localfile.html to control it works
  • #8129 Fix cloning multiple selected options in IE8
  • #8135 Makes sure any exception thrown by Firefox when trying to access an XMLHttpRequest property when a network error occured is caught and notified as an error. Added test/networkerror.html to test the behavior
  • #8138 Access to document.location is made only once at load time and if it fails (throwing an exception in IE when document.domain is already set), we use the href of an A element instead
  • #8145 Added readyWait tests
  • #8146 introducing the xhrFields option with is a map of fieldName/fieldValue to set on the native xhr. Can be used to set withCredentials to true for cross-domain requests if needed
  • #8152 applying the same special cases for protocol “chrome-extension:” as were for “file:” (needs tests). Re-organizes and fixes the handling of special cases for HTTP status code in the xhr transport
  • #8177 XHR transport now considers 304 Not Modified responses as 200 OK if no conditional request header was provided (as per the XMLHttpRequest specification)
  • #8193 Fixes abort in prefilter. No global event will be fired in that case even if the global option is set to true. Unit test added
  • #8198 Remove unnecessary “script.type = text/javascript;”
  • #8200 Unexpose $.support._scriptEval as it’s not needed. Use a private var instead
  • #8209 Make sure that mousing over Chrome “internal div” doesn’t trigger a mouseleave
  • #8219 Introduces the mimeType option to override content-type header in conversion (and in native xhr when possible). Adds companion overrideMimeType method on jqXHR object (it simply sets the option)
  • #8220 Remove backslashes from tag name filter
  • #8245 Ajax now ensures header names are capitalized so that non-compliant xhr implementations don’t override them
  • #8250 ajax does not work in opera 10 widgets
  • #8277 Sets data to undefined rather than null when it is not provided in ajax helpers so that it won’t revent data set in ajaxSettings from being used.
  • #8297 Make sure response headers with empty values are handled properly and do not prevent proper parsing of the entire response headers string.