More Bug Fixes and Features
Another night, more bug fixes, a couple tickets resolved, and a couple
new features.
New Features:
---------------------------------------
- There are now onSuccess and onError callbacks in the $.xml()
function, they can be used like this:
$.xml({
url: "404.html",
type: "GET",
data: "foo=bar",
onComplete: function(){},
onSuccess: function(){},
onError: function(){}
});
- It's now possible to append <td> and <th> elements to <tr>s using
.append() and .prepend(), like so:
$("tr").append("<td>New Column");
- It's now possible to append <tr> elements to <table>s without the
need for <tbody>s (in all browsers), like so:
$("table").append("<tr><td>new row</td></tr>");
- The W3C box model is now checked for in the jQuery core and the
result is stored in $.boxModel, it returns true if the browser is W3C
box model compliant (this includes IE 6 in standards mode).
Bug Fixes:
---------------------------------------
- trigger()-based events are now passed through $.event.fix(), to give
them that extra layer of 'authenticity' (e.g. they now have a
event.stopPropagation() method).
- $.css(x,'height') and $.css(x,'width') now account for the box model
support of a particular browser, not just blindly guessing that IE is
bad.
- $.css(x,'height') and $.css(x,'width') now account for borders in
W3C-compliant browsers.
- The location property is no longer checked in the scary
check-for-the-window-object-because-ie-is-stupid hack. Meaning that
'document' should no longer be confused for 'window'.
- All the fixes that were mentioned over at Dean's blog (concerning
DOM Ready) have been added, this includes checking for WebKit instead
of Safari and breaking up <script> to foil stupid virus-checkers.
- Removed the recent cssText addition, as it didn't work as expected.
Resolved Tickets:
---------------------------------------
- Ticket #2: @* and @foo selectors were broken, this has been fixed.
- Ticket #3: DOM Nodes with a property of 'length' are no longer
confused for arrays.
- Ticket #4: IE is now forced layout so that changing opacity will
work correctly.
- Ticket #8: It's now possible to set the disabled property of an
element to false - and actually have it be disabled in Mozilla.
All of this is in SVN and in the latest copy of dev:
http://jquery.com/src/dev/sane/
Let me know if you spot any weird bugs that I didn't catch from these changes.
--John