Commit Graph

3031 Commits

Author SHA1 Message Date
John Resig
cd6ec6e157 Added an extra check for removing a named cache property - calling it when it didn't exist caused an exception. 2007-09-09 23:08:21 +00:00
John Resig
139b03af7c Landing a version of $(document)/$(window) .width()/.height(). It won't win any awards, but it'll hold us over for this release. 2007-09-09 22:59:41 +00:00
John Resig
052aa1445a Added .prevAll() and .nextAll() functionality. 2007-09-09 21:34:37 +00:00
John Resig
b59c94d5c2 So, apparently, I never committed the second half of the new field value code. This allows you to set values on groups of checkboxes, radio buttons, and selects. 2007-09-09 19:00:56 +00:00
John Resig
b4bf244c0e Fixed some line ending issues. 2007-09-09 18:29:15 +00:00
John Resig
4e504d86b9 Errors were occuring with getScript, if you called it too early. 2007-09-09 18:09:27 +00:00
John Resig
97fe63cb48 Moved the fx queueing over to the new expando system. 2007-09-09 16:17:32 +00:00
John Resig
7e9d853154 .stop() wouldn't resume any queued animations. 2007-09-09 16:12:56 +00:00
John Resig
3a4e1233aa Landing the new expando management code. Completely overhauls how data is associated with elements.
Plugins will be most interested in:
- jQuery.data(elem) -> Unique ID for the element
- jQuery.data(elem, name) -> Named data store for the element
- jQuery.data(elem, name, value) -> Saves a value to the named data store
- jQuery.removeData(elem) -> Remove the expando and the complete data store
- jQuery.removeData(elem, name) -> Removes just this one named data store

jQuery's .remove() and .empty() automatically clean up after themselves. Once an element leaves a DOM document their events are no longer intact. Thus, statements like so:
{{{
  $("#foo").remove().appendTo("#bar");
}}}
should be written like so:
{{{
  $("#foo").appendTo("#bar");
}}}
in order to avoid losing the bound events.
2007-09-08 23:31:23 +00:00
John Resig
15a78f8fea Reintroduced .offset() as a default include, added original author credits. 2007-09-08 18:02:39 +00:00
John Resig
2929f8aa67 Landing the .clone() rewrite by Brandon (also includes the new event cloning functionality .clone(true)). 2007-09-08 16:19:34 +00:00
John Resig
cc22c04c90 Disabled the automatic inclusion of offset.js 2007-09-08 14:58:52 +00:00
John Resig
2ce41905c4 Removed the test suite generation code. 2007-09-08 14:50:11 +00:00
John Resig
28ee5c6922 Added the new .offset() method, directly imported from Dimensions (heavily worked over by both Brandon and John).
Original source:
http://brandonaaron.net/jquery/issues/dimensions/new_offset/jquery.offset.js
2007-09-08 14:44:29 +00:00
John Resig
d2f82aba26 Added .hasClass() (Simply just passes through to .is()). 2007-09-08 13:49:42 +00:00
John Resig
6728e3cf74 Finished up some of the reorganization. 2007-09-08 12:46:01 +00:00
John Resig
b4e23b5af0 Reorganzing the jQuery source (first phase). 2007-09-08 12:42:32 +00:00
John Resig
13b66c8ba9 Added a new :animated selector - only selects elements that are currently being animated. 2007-09-08 12:33:06 +00:00
John Resig
902554a38d Massive FX rewrite. Full list of changes:
- You can now animate non-px values (em and %, for example)
- You can animate things things that previously broke (like font-size)
- You can now write fx plugins (to add in the ability to animate colors, for example)
- Advanced queueing controls were added (.queue(), .dequeue(), and {queue:false})
- Step was re-tooled to work with the new fx plugin scheme
- Added the ability to do relative animations
- Made it so that you can do simultaneous animations on a single element
- A complete refactoring of jQuery.fx, improving naming, and usability
2007-09-07 21:57:40 +00:00
John Resig
3abf3125cb Fix for bug #760 (fontSize returns different values in IE). This was part of a larger issue where IE returned non-pixel values from it's computed style - this normalizes it (thanks to a fix by Dean Edwards). 2007-09-07 21:39:44 +00:00
John Resig
ba2109136d Fixed a bug in event - "native" is a reserved word in Safari 2. 2007-09-07 19:28:25 +00:00
John Resig
84eb2cffca Forgot to update the $.param() tests. 2007-09-05 17:22:13 +00:00
John Resig
ad5539bab3 Re-disabled the Ajax tests in Safari. 2007-09-05 17:09:18 +00:00
John Resig
f96bf10415 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
2007-09-05 17:06:05 +00:00
John Resig
f28f199dc0 Added support for the new .andSelf() method. This method combines the previous two matched sets on the stack into a single stack.
For example:
  $("#foo").parent();
  // => [ #bar ]

  $("#foo").parent().andSelf();
  // => [ #bar, #foo ]
2007-09-04 04:44:54 +00:00
John Resig
d259ec1a93 Fix for bug #1549, where the DOM conversion of <code/> and similar elements would fail. This forces it to work correctly in all browsers. 2007-09-04 04:34:48 +00:00
John Resig
7d02f06e03 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) 2007-09-04 04:17:14 +00:00
John Resig
53dc6afc31 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/ 2007-09-04 02:55:38 +00:00
John Resig
139393fe09 Removed all inline documentation. The current version of all documentation is stored online, on the wiki: http://docs.jquery.com/ 2007-09-04 01:57:35 +00:00
John Resig
1ce8006d48 Added a new .stop() method which stops all animations running on the matched set of elements.
Example:
  $("#foo").slideDown(1000);
  setTimeout(function(){
    $("#foo").stop();
  }, 500);
2007-09-04 00:28:22 +00:00
John Resig
d5bb0e3179 Re-disabled the ajax tests in Safari 3. 2007-09-03 23:59:31 +00:00
John Resig
a5dbcaf675 Added support for:
- Cross Domain getScript
  $.getScript("http://foo.com/script.js");
- JSONP
  $.ajax({ url: "script.js", type: "jsonp" });
  $.getJSON("script.js?callback=?");
- Cross Domain JSONP/getJSON
  $.getJSON("http://foo.com/script.js?callback=?");
- No-cache Ajax Requests
  $.ajax({ url: "test.html", cache: false });
2007-09-03 23:45:14 +00:00
John Resig
456f0fe598 Added namespaced events to bind, unbind, and trigger. This allows you to deal with event handlers of a specific "class" (great for plugins). 2007-09-03 14:53:09 +00:00
John Resig
a5c319f922 Reverted the change that I made in #1320. 2007-09-02 22:34:18 +00:00
John Resig
346ceacce3 Added support for a new :header psuedo-selector (only selects H1-H6 elements). 2007-08-31 05:43:24 +00:00
John Resig
fbd2b066a7 Make it so that you can filter tests by keyword. 2007-08-31 05:41:08 +00:00
John Resig
e3263063e4 Added support for .wrapInner() and .wrapAll() - and re-wrote .wrap() to use .wrapAll(). (Fixes bug #1296) 2007-08-31 05:33:43 +00:00
John Resig
85afa7c1ba 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. 2007-08-31 03:38:02 +00:00
John Resig
079d651e10 Added $(...).map() functionality. (Also closes #1250, imo) 2007-08-31 03:26:03 +00:00
John Resig
5c19701a89 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). 2007-08-30 16:34:34 +00:00
John Resig
042a46386a 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) 2007-08-30 05:51:11 +00:00
John Resig
15faf783b9 Made jQuery's internal trigger method return the value from handle. (Bug #1417) 2007-08-28 04:42:35 +00:00
John Resig
25e83d27cb 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) 2007-08-28 04:34:23 +00:00
John Resig
127c0b8a5d Fixed the issue where $("body").find("div#foo") would ignore the specified tag name. (Bug #1543) 2007-08-27 04:58:02 +00:00
John Resig
3ae74b523e 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). 2007-08-25 05:12:20 +00:00
John Resig
0477a6e99e Added a test case for "purple include", fixed a bug. 2007-08-25 03:55:12 +00:00
John Resig
34f1042902 New feature: You can now inject portions of a document via .load(), as opposed to the full thing.
Examples:
- $("#test").load("test.html #something");
- $("#test").load("test.html p.user");

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)
2007-08-25 03:33:08 +00:00
John Resig
97f2032e13 Landing animation of scrollLeft/scrollTop (also works on random DOM object properties as well). 2007-08-25 03:03:27 +00:00
John Resig
557ec9a92f Tagging the 1.1.4 release. 2007-08-24 01:49:27 +00:00
John Resig
257eaf7ee3 Marked all the appropriate methods as being deprecated for the 1.1.4 release (in preparation for 1.2). 2007-08-24 01:28:07 +00:00