Yehuda Katz
17955cacf4
Fixes $.trim for closes #4980
2009-11-30 10:22:18 -08:00
Karl Swedberg
255068da33
added missing semicolons
2009-11-28 04:09:14 +08:00
Karl Swedberg
a5efe9d3a6
added missing radix parameter for parseInt()
2009-11-28 04:09:14 +08:00
Karl Swedberg
ddb86f8d5b
added curly braces around all if/else statements
2009-11-28 04:09:14 +08:00
John Resig
a7678267d8
Disable the X-Requested-With header to avoid preflighting remote POST requests. Fixes #4601 .
2009-11-25 13:29:34 -05:00
John Resig
0f6e9a8c69
Fixed spacing on the modified Ajax code.
2009-11-25 13:24:24 -05:00
Mark Gibson
ef819c91b9
Fixing endlines.
2009-11-25 12:09:53 -05:00
Robert Katic
0bb3998a6a
Re-adding zeros removed from slice calls in last commit.
2009-11-26 00:58:39 +08:00
Robert Katic
04dbdb7525
Corrected RegExp to match event namespaces. Fixes #5303 .
2009-11-26 00:58:39 +08:00
Robert Katic
ac00fe5bbb
Generic jQuery.merge and safer jQuery.makeArray(nodeList).
...
* Made jQuery.marge more generic supporting null and undefined values, and supporting array like objects as results. Fixes #5527 .
* Made jQuery.makeArray(nodeList) more safer using jQuery.merge internally. Fixes #5528 .
* Added a second "results" argument to jQuery.makeArray for internal usage to avoid intermediary arrays in init.
2009-11-26 00:56:49 +08:00
John Resig
b30af34f28
Added support for .text() on text nodes. Fixes #5525 .
2009-11-17 14:52:08 -05:00
Andrea Giammarchi
3a23a5c17d
Changed the === undefined ready event check to == null since frameElement is usually null and was skipping the normal line of checks.
2009-11-17 10:45:01 -05:00
Scott Gonzalez
9cd5866a29
Allowing falsy values to be passed as a speed for hide().
2009-11-13 12:23:39 +08:00
Scott Gonzalez
231c875678
Allowing falsy values to be passed as a speed for show().
2009-11-13 12:23:39 +08:00
Robert Katic
93be758de9
Made jQuery.extend(true, ...) to extend recursively only 'object literal' values.
2009-11-12 21:59:47 +08:00
Robert Katic
990d9ca1b0
Made isObjectLiteral to work correctly with custom objects with empty prototypes.
2009-11-12 21:59:47 +08:00
lrbabe
c07d15d5a2
Use array.indexOf if available (speeds up modern browsers). Thanks to lrbabe and Andrea for the patch. Fixes #5160 .
2009-11-11 15:15:58 -05:00
John Resig
5ac2e0837c
Added useMap and frameBorder IE support to attr. Fixes #4561 .
2009-11-11 15:11:58 -05:00
John Resig
357e2ae989
Added a check to make sure that a load request isn't done if the element doesn't exist. Fixes #4235 .
2009-11-11 14:55:32 -05:00
John Resig
c2101245c0
Pass in the XHR object as the third argument to the success callback (which helps $.get, $.post, and load). Fixes #3363 .
2009-11-11 14:29:01 -05:00
John Resig
7c4144fab3
Fixed the case where HTML that contained entities was being inserted as text strings instead of HTML. Thanks to dmethvin for the test case! Fixes #5483 .
2009-11-11 14:23:56 -05:00
John Resig
449e099b97
Landing tweak from 'haruka' that fixes non-pixel fontSize values in IE. Fixes #760 .
2009-11-11 14:17:16 -05:00
Rich Dougherty
bf71575bb4
Land Rich's fix for not using window.top to do frame detection. Fixes #4787 .
2009-11-11 13:56:39 -05:00
John Resig
c4c820efff
Made jQuery('<div/>') and jQuery('<div></div>') use the same code path (making the second one faster). Fixes #5293 .
2009-11-11 13:49:29 -05:00
John Resig
d933e9c26d
Opera 9.2 was interpreting .5 as 0.50, changing it to .55 lets the result be the same in all browsers: 0.55. Fixes #5344 .
2009-11-11 13:45:03 -05:00
John Resig
dee8e45ef3
Removed the use of this.length++ as it makes it hard to use the init method directly. Fixes #4955 .
2009-11-11 13:42:50 -05:00
Mr Speaker
5cb1163469
Making sure that you can bind multiple toggles to a single element without problems. Thanks to 'Mr Speaker' for the original patch. Fixes #5274 .
2009-11-11 09:46:24 -05:00
John Resig
4b55e94d08
Renamed isObject to isObjectLiteral to be more specific.
2009-11-10 23:07:05 -05:00
John Resig
262fcf7b7b
Require that, at least, document.body exists before firing the ready event. This may stop jQuery from working on pages that don't create a document.body (such as Safari, when no body exists) but considering that we've required a document.body since 1.3 and haven't broken any pages, this doesn't appear to be a pressing issue. Used the test case written by dmethvin to verify the bug and the fix. Fixes #4320 .
2009-11-09 13:47:53 +01:00
John Resig
24e18d4cae
Backing out commit 81bfd9b870
, read the ticket incorrectly - and seeing some of the other earlier tickets it's obvious that a more generic solution is needed. Thanks jdalton for the catch.
2009-11-09 13:30:33 +01:00
John Resig
4fd730dca7
Merge branch 'master' of git@github.com:jquery/jquery
2009-11-09 13:01:10 +01:00
lrbabe
d251809912
Making mouseenter and mouseleave work with .live().
2009-11-09 12:59:54 +01:00
lrbabe
9a69b2cf08
Cleanup bubbling focus and blur events
...
- Use cached event instead of jQuery.event
- Do not cache event.special if you use it only once
2009-11-09 19:41:43 +08:00
Robert Katić
e03aee1aa6
Made the closest method evaluate the selector with appropriate context.
2009-11-09 12:39:29 +01:00
rkatic
c2bbcd8833
Added comments to isObject.
2009-11-09 19:32:24 +08:00
John Resig
76f6f0d39d
Fixing spacing problems from rkatic's patches.
2009-11-07 17:40:47 +01:00
rkatic
3dc5bc5a8b
Make liveHandler to use jQuery.lastCloser and speed up internal sorting.
2009-11-08 00:37:05 +08:00
rkatic
0f03c7489f
Store last closer value to jQuery.lastCloser instead of using data API.
2009-11-08 00:36:44 +08:00
John Resig
3106039aa8
Made sure that animate callbacks get executed even when no properties are passed in. Fixes #5459 .
2009-11-07 17:22:35 +01:00
John Resig
b0fe380cf8
Make .add() take an optional context and - if a context is specified in the root selector - use that as the base context.
2009-11-07 16:43:31 +01:00
John Resig
ef05f44cce
Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438 .
2009-11-07 16:15:33 +01:00
John Resig
6a722e251d
jQuery.ajax modified the passed-in object only to help test the code - this shouldn't occur. Fixes #5439 .
2009-11-07 16:08:07 +01:00
John Resig
81bfd9b870
Make sure that document.body exists, at least, in IE before the ready event is fired. Fixes #5443 .
2009-11-07 16:00:43 +01:00
John Resig
513053d62b
The complete event wasn't getting called on local file 404s. Thanks to 'mrspeaker' for the patch. Fixes #5468 .
2009-11-07 14:59:47 +01:00
John Resig
9a371e2d93
Fixed the case where getComputedStyled was assumed to exist if getBoundingClientRect did (which isn't the case on the Playstation 3). Fixes #5467 .
2009-11-07 14:57:27 +01:00
visionmedia
50cf4351a6
Consistant splits using " " instead of ","
...
This was used in several other areas, and IMO is easier to read
and since nothing is multi-word then we misewell use " "
2009-10-27 08:40:59 +08:00
John Resig
81f65ce339
Pull in the Sizzle library dynamically using a submodule and make it part of the jQuery build process.
2009-10-26 18:23:31 -04:00
John Resig
bbffc99f7c
Moved a bunch of methods out of the jQuery-specific Sizzle code into more-appropriate files, in jQuery itself.
2009-10-26 18:07:57 -04:00
John Resig
bcbd06b66f
Removed the revision info and fixed the date pull to work against git log instead of SVN.
2009-10-23 03:25:40 -04:00
John Resig
098a2bb4d0
Fixed the cleaning method to support namespaced elements. Thanks to einaros for the patch recommendation. Fixes #5358 .
2009-10-12 16:26:01 +00:00
John Resig
4b5a680f77
Fixed == change in ready.
2009-10-08 18:13:07 +00:00
John Resig
69e6e53555
Adding in .unwrap() support, thanks to Ben Alman! Fixes #5191 .
2009-09-25 21:41:21 +00:00
John Resig
67d445a703
A follow-up to [6578] (which stopped adding expandos to elements that didn't have data). That broke jQuery.unique() (so we're now using the unique from Sizzle). Using Sizzle's unique (which also sorts in document order) changed how add, andSelf, parents, nextAll, prevAll, and siblings work. after and before were changed to not use .add() (in order to guarantee their position in the jQuery set). Also, jQuery.data(elem) was updated to return that element's data object (instead of its ID).
...
$("<div/>").after("<span/>")
=> [ div, span ]
(calling after on a disconnected DOM node adds the nodes to the end of the jQuery set)
$("<div/>").before("<span/>")
=> [ span, div ]
(calling before on a disconnected DOM node adds the nodes to the beginning of the jQuery set)
$("div").add("span")
=> [ div, span, span, div, span ]
(results now come out in document order)
$("div").find("code").andSelf();
=> [ div, code, code ]
(results now come out in document order)
Same goes for .parents(), .nextAll(), .prevAll(), and .siblings().
Exception: .parents() will still return the results in reverse document order.
jQuery.data(elem)
=> { object of data }
(no longer returns the unique ID assigned to the node)
2009-09-25 17:55:20 +00:00
Yehuda Katz
67089eedf6
Getting $.param working well; Patch by ben_alman
2009-09-17 22:37:19 +00:00
Yehuda Katz
45dfa3b0fc
Probably not the optimal solution, but tests pass.
2009-09-16 08:33:00 +00:00
Ariel Flesler
9ebb2fc654
jquery event: closes #5250 . bind(), unbind() and one() support Object Literals (needs some refactor though)
2009-09-16 02:19:18 +00:00
Brandon Aaron
97e134fe80
data should not add expando unless actually adding data
2009-09-15 21:14:08 +00:00
John Resig
24ffc395a7
Missing a var on a for loop, caused a variable to be leaked.
2009-09-15 21:09:46 +00:00
John Resig
e907b8769f
Missing a var on a for loop, caused a variable to be leaked.
2009-09-15 21:01:00 +00:00
Brandon Aaron
daffb954e3
offset is now a setter
2009-09-15 19:15:04 +00:00
Jörn Zaefferer
0b36b26259
fixed global variables introduced in for loop with missing var-keyword (detected via QUnit's no ?noglobals)
2009-09-15 17:39:21 +00:00
Ariel Flesler
5550356a12
jquery attributes: closes #5234 . attr() supports jQuery.fn methods.
2009-09-15 17:23:26 +00:00
John Resig
fc4c691534
Adding some fixes for commit [6537]. If there's leading whitespace, or if an exception is thrown by innerHTML, we need to use the old style method.
2009-09-15 16:46:15 +00:00
Ariel Flesler
cf8c1249d1
jquery ajax: addition for #2452 . Wasn't working correctly in some cases.
2009-09-15 16:45:37 +00:00
John Resig
7638fc5835
Fix for SVN rev [6537]. Events weren't being unbound correctly in Internet Explorer (cleanData wasn't handling malformed NodeList results correctly).
2009-09-15 15:56:18 +00:00
Ariel Flesler
5b9214e7d8
jquery ajax: closes #2452 . get() and post() weren't shifting all arguments correctly.
2009-09-15 15:28:28 +00:00
Ariel Flesler
183f37e4b4
jquery ajax: closes #4994 . Adding 'context' setting to $.ajax
2009-09-15 15:19:58 +00:00
Yehuda Katz
c4f144eeff
avoid creating a new data cache if we don't need one. Also, short-circuit the case where $.data is used to get the cache id
2009-09-15 07:59:53 +00:00
Ariel Flesler
19cd84cf32
jquery data: adding missing semicolons
2009-09-15 01:02:18 +00:00
Yehuda Katz
9b20eb4c85
Make jQuery.winnow a local function
2009-09-15 00:35:35 +00:00
Ariel Flesler
321267dcec
jquery fx: closes #2542 . show/hide(0, fn) wasn't calling the callback.
2009-09-15 00:32:13 +00:00
John Resig
3eb56b09b8
Another fix for [6537] - make sure that .innerHTML isn't used on non-HTML documents and that we only attempt to use .innerHTML on DOM Elements.
2009-09-14 23:20:23 +00:00
John Resig
766635e862
Fixed a bug introduced in SVN rev [6537] that caused XML-based fragment creation to fail, in IE.
2009-09-14 23:12:06 +00:00
Ariel Flesler
681f4fd3cd
jquery event: misc removal
2009-09-14 22:58:20 +00:00
Ariel Flesler
a273120291
jquery data: closes #5224 . Exposing the expando.
2009-09-14 22:34:04 +00:00
John Resig
173c1477ae
Added support for .before(), .after(), and .replaceWith() on disconnected DOM nodes. Fixes bug #3940 .
2009-09-14 22:09:42 +00:00
Ariel Flesler
bca8225413
jquery event: fixes #4989 . blur and focus events now bubble and can be handled using live().
2009-09-14 22:04:22 +00:00
Brandon Aaron
f3474c00cd
fix for #5198 , event memory leak limited to IE only via conditional compilation
2009-09-14 21:14:15 +00:00
Brandon Aaron
4a3c4c86c9
fix for #5017
2009-09-14 20:55:40 +00:00
Ariel Flesler
36ebb4f75e
jquery ajax: Misc rename
2009-09-14 19:57:49 +00:00
Ariel Flesler
0790989eb6
jquery core: Fixed #5202 . Fixing selector generation when a manipulation function receives a jQuery object.
2009-09-14 18:03:18 +00:00
Ariel Flesler
66c58e9db6
jquery core: removing the body optimization, as it is then handled by $("TAG").
2009-09-14 17:33:15 +00:00
Ariel Flesler
9e1a955aab
jquery core: commenting the new access function.
2009-09-11 17:47:40 +00:00
Ariel Flesler
d1285504fb
jquery core: Closes #5189 . Added a generic function to handle getting/setting key-value/setting a hash.
2009-09-09 21:14:28 +00:00
Ariel Flesler
aadc268abf
jquery core: fixes 5187. getElementsByTagName optimization was breaking $('div').live()
2009-09-09 16:50:58 +00:00
Ariel Flesler
bf230ffb6a
jquery core: closes #5186 . getElementsByTagName optimization was breaking the selector attribute.
2009-09-09 16:33:16 +00:00
John Resig
9de120e6d7
Added support for .eq(-N), .first(), and .last(). Fixes #2164 and #4188 .
2009-09-09 00:21:21 +00:00
John Resig
4ea4fad090
Optimize jQuery() for the case $("TAG").
2009-09-08 04:26:47 +00:00
John Resig
1e750a00e9
Use the native Array indexOf method if it exists, for jQuery.inArray.
2009-09-08 01:45:11 +00:00
John Resig
96dd06ea50
Removed jQuery.className.(has|remove|add) in favor of .addClass/removeClass/hasClass. Also rewrote the functions for additional performance.
2009-09-08 01:07:50 +00:00
John Resig
520f1a2684
Broke the logic for .clean() wrap out into a separate, static, data structure. Also improved the performance of .html() looking for the case where .innerHTML can be used without problems. Also tweaked some cases where cleanData() was used, no need to use jQuery selectors in these cases.
2009-09-07 20:55:36 +00:00
John Resig
9d8d74569c
Split out the fragment-building code from domManip. Switched core.js to using that instead. Also moved the standalone tag detection to $(...) for performance.
2009-09-07 18:58:01 +00:00
John Resig
b7d4e0e46c
Added an optimization for the case where $("body") is used.
2009-09-07 17:20:38 +00:00
Yehuda Katz
50d78e7658
Adds nested param serialization; Closes #4201 (by merbjedi)
2009-09-02 05:16:21 +00:00
John Resig
569c8b45c0
Fixed a bug with the isXMLDoc test - also made sure that isXMLDoc was handling the case where documentElement is undefined (which only occurs on HTML documents in IE).
2009-08-27 20:07:45 +00:00
John Resig
957cd6fb2a
Tweaked the isXMLDoc iframe test case to test the document, not the body element (which doesn't exist in IE). Also made the isXMLDoc code handle cases where elem is null, undefined, etc.
2009-08-27 19:22:48 +00:00
John Resig
f52c4a3d5f
If the XHR object no longer exists assume that the request was aborted.
2009-08-26 17:39:52 +00:00
John Resig
bddd1837bb
Moved exposing window.jQuery and window.$ to the end of the jQuery file (helps some compatibility cases with older version of Prototype). Fixes ticket #4834 .
2009-08-10 21:22:31 +00:00
John Resig
d6991fa273
Added support for .closest(filter, DOMElement). Fixes #4072 .
2009-07-28 12:28:59 +00:00
John Resig
61b18c866c
Backing out commit #6507 - causes too many problems.
2009-07-28 12:22:10 +00:00