John Resig [Wed, 5 Sep 2007 17:06:05 +0000 (17:06 +0000)]
Integration of Mike Alsup's excellent form serialization code. The benefits are as follows:
- New method: .serializeArray()
This returns an array of name/value pairs representing the contents of a form, or individual input elements.
- Enhancement: .serialize()
The results are correct now (as opposed to the mess from before), and allows you to serializes forms directly (rather than just the input elements).
- Enhancement: .val()
This now returns the correct value when dealing wih selects. Additionally, when dealing with multiple selects, it returns an array of values.
Based upon Mike's code:
http://malsup.com/jquery/form/comp/form.js
and test suite:
http://malsup.com/jquery/form/comp/test.html
John Resig [Tue, 4 Sep 2007 04:17:14 +0000 (04:17 +0000)]
Made it so that you can't change the type of an input element, having it throw an exception instead (except for input elements that haven't yet been injected into the DOM). (Bug #1536)
John Resig [Tue, 4 Sep 2007 02:55:38 +0000 (02:55 +0000)]
Removed all deprecated functionality for jQuery 1.2. A full list of what was removed can be found here: http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/
John Resig [Fri, 31 Aug 2007 03:38:02 +0000 (03:38 +0000)]
Added support for .contents(). Returns ALL child nodes for an element - except for on an IFrame, then it returns the IFrame's document. This fixes #1024.
John Resig [Thu, 30 Aug 2007 16:34:34 +0000 (16:34 +0000)]
Made it so that you can pass in an event object to the trigger data args and it'll override the custom event object (this way you can pass in the event object of a mousemove to a drag event trigger, for example).
John Resig [Thu, 30 Aug 2007 05:51:11 +0000 (05:51 +0000)]
Added a new extra fn arg to trigger (so you don't have to simulate the trigger yourself). (Bug #1467) Added a new .triggerHandler() method that allows you to NOT trigger native calls AND returns the response from the handlers. (Bug #873 & #1417)
John Resig [Tue, 28 Aug 2007 04:34:23 +0000 (04:34 +0000)]
Made it so that the last return value is always returned from handle() (unless one of the return values was false, in which case the return value is false). (Bug #1416)
John Resig [Sat, 25 Aug 2007 05:12:20 +0000 (05:12 +0000)]
Added new replaceWith() (replace all matched elements with the specified HTML/DOM Elements/Array/etc.) and replaceAll() (replace the specified elements with the set of matched elements).
Caveats:
- No scripts are injected when a selector is used.
- The selector is rooted inside the head and body - it's equivalent to doing:
$("body,head").find(selector)
John Resig [Wed, 22 Aug 2007 05:44:47 +0000 (05:44 +0000)]
Made 'jQuery' unrollable via .noConflict(true) and instances of new Function() have been converted to eval(function(){}) in order to handle jQuery name changes. (Bug #1393)
John Resig [Tue, 21 Aug 2007 08:25:11 +0000 (08:25 +0000)]
Using some of the ideas presented by rformato, I've significantly sped up $("#id") selection. It's now just 10% slower than doing: $(document.getElementById("test")), which seems quite acceptable. (Bug #1316)
John Resig [Tue, 21 Aug 2007 05:43:44 +0000 (05:43 +0000)]
Fix for a selector speed regression (calling a simple selector many times resulted in a significant speed down). This has been fixed by breaking the RegExps out into the global scope. This required that a closure be implemented around the full jQuery script (which is now the case). Some simple changes were made in addition to the RegExp one, allowing for some greater flexibility on our part - and hopefully better compression.
Speed results:
http://dev.jquery.com/~john/ticket/1351/ vs.
http://dev.jquery.com/~john/ticket/1351/113.html vs.
http://dev.jquery.com/~john/ticket/1351/112.html
John Resig [Mon, 20 Aug 2007 06:29:41 +0000 (06:29 +0000)]
Just pushed some major speed improvements through for $.each() - we're now seeing a 2x speed improvement over 1.1.3. Some crude results can be found here: http://dev.jquery.com/~john/ticket/each/
John Resig [Sun, 19 Aug 2007 23:37:26 +0000 (23:37 +0000)]
Complete overhaul of the Ajax test suite, it's now passing in all browsers. In order to achieve this I had to fix a numbe
r of bugs in the suite itself, along with other random bugs that popped up. The following bugs were resolved along the wa
y: #1236 (.extend() keeps processing when it hits nulls), #1028 (.extend() now works recursively), #1080 ($.get no longer
overwrites the data parameter), #1210 (Creating script and link tags now work), and #1463 (jQuery.global has been re-too
led to no longer leak memory and slow things down).
John Resig [Sun, 19 Aug 2007 07:28:41 +0000 (07:28 +0000)]
Added a fix for IE returning comment nodes in * queries. I put the logic in $.merge() but added a conditional such that the speed hit only effects IE users. (Bug #1155)
John Resig [Sun, 19 Aug 2007 00:48:53 +0000 (00:48 +0000)]
We were catching exceptions within the success callback of an Ajax request, then causing an error callback to be called (which is incorrect). (Bug #1441)
John Resig [Sun, 29 Jul 2007 22:32:06 +0000 (22:32 +0000)]
Added a fix for Safari's broken CSS getComputedStyle accessing. Additionally, added a fix for Safari mis-reporting @selected for display: none options. The test suite is now completely passing in Safari 3. (Bug #1349)
John Resig [Wed, 25 Jul 2007 00:56:50 +0000 (00:56 +0000)]
$("#foo", xml) would always return an empty set, fixed (bug #877). Additionally, a bug in jQuery.isXMLDoc(xmlDoc) was discovered, if the element was, in fact, an XML document.
John Resig [Fri, 20 Jul 2007 19:33:44 +0000 (19:33 +0000)]
The isTimeout fix from #970 was causing unintended status bugs (fixed). This also includes a fix for errors that occurred during an empty eval in IE (but #1410).
John Resig [Fri, 20 Jul 2007 18:08:29 +0000 (18:08 +0000)]
IE doesn't like doing attaching the mergeNum property to XML documents, so for now, we're just going to (possibly) return duplicates in IE, in XML documents. (bug #1357).
Added runtest ant task (doesn't display results yet);
added href-attribute to DOMElement, fixed XMLHttpRequest to actually allow sync requests, fixed new Thread(new Runnable({run...})) to use new Thread({run:...})
John Resig [Mon, 9 Jul 2007 03:08:20 +0000 (03:08 +0000)]
Got some XHR tests to run, still some hanging threads (need to investigate). Started moving some Ajax tests away from using PHP (more portable this way). Fixed a number of XHR env bugs.